| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of js; | 5 part of js; |
| 6 | 6 |
| 7 abstract class NodeVisitor<T> { | 7 abstract class NodeVisitor<T> { |
| 8 T visitProgram(Program node); | 8 T visitProgram(Program node); |
| 9 | 9 |
| 10 T visitBlock(Block node); | 10 T visitBlock(Block node); |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 return BIT_XOR; | 734 return BIT_XOR; |
| 735 case "|": | 735 case "|": |
| 736 return BIT_OR; | 736 return BIT_OR; |
| 737 case "&&": | 737 case "&&": |
| 738 return LOGICAL_AND; | 738 return LOGICAL_AND; |
| 739 case "||": | 739 case "||": |
| 740 return LOGICAL_OR; | 740 return LOGICAL_OR; |
| 741 case ',': | 741 case ',': |
| 742 return EXPRESSION; | 742 return EXPRESSION; |
| 743 default: | 743 default: |
| 744 throw new leg.CompilerCancelledException( | 744 throw "Internal Error: Unhandled binary operator: $op"; |
| 745 "Internal Error: Unhandled binary operator: $op"); | |
| 746 } | 745 } |
| 747 } | 746 } |
| 748 } | 747 } |
| 749 | 748 |
| 750 class Prefix extends Expression { | 749 class Prefix extends Expression { |
| 751 final String op; | 750 final String op; |
| 752 final Expression argument; | 751 final Expression argument; |
| 753 | 752 |
| 754 Prefix(this.op, this.argument); | 753 Prefix(this.op, this.argument); |
| 755 | 754 |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 class Comment extends Statement { | 1099 class Comment extends Statement { |
| 1101 final String comment; | 1100 final String comment; |
| 1102 | 1101 |
| 1103 Comment(this.comment); | 1102 Comment(this.comment); |
| 1104 | 1103 |
| 1105 accept(NodeVisitor visitor) => visitor.visitComment(this); | 1104 accept(NodeVisitor visitor) => visitor.visitComment(this); |
| 1106 Comment _clone() => new Comment(comment); | 1105 Comment _clone() => new Comment(comment); |
| 1107 | 1106 |
| 1108 void visitChildren(NodeVisitor visitor) {} | 1107 void visitChildren(NodeVisitor visitor) {} |
| 1109 } | 1108 } |
| OLD | NEW |