| 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_ast; | 5 part of js_ast; |
| 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 | 706 |
| 707 int get precedenceLevel => CALL; | 707 int get precedenceLevel => CALL; |
| 708 } | 708 } |
| 709 | 709 |
| 710 class New extends Call { | 710 class New extends Call { |
| 711 New(Expression cls, List<Expression> arguments) : super(cls, arguments); | 711 New(Expression cls, List<Expression> arguments) : super(cls, arguments); |
| 712 | 712 |
| 713 accept(NodeVisitor visitor) => visitor.visitNew(this); | 713 accept(NodeVisitor visitor) => visitor.visitNew(this); |
| 714 | 714 |
| 715 New _clone() => new New(target, arguments); | 715 New _clone() => new New(target, arguments); |
| 716 |
| 717 int get precedenceLevel => ACCESS; |
| 716 } | 718 } |
| 717 | 719 |
| 718 class Binary extends Expression { | 720 class Binary extends Expression { |
| 719 final String op; | 721 final String op; |
| 720 final Expression left; | 722 final Expression left; |
| 721 final Expression right; | 723 final Expression right; |
| 722 | 724 |
| 723 Binary(this.op, this.left, this.right); | 725 Binary(this.op, this.left, this.right); |
| 724 | 726 |
| 725 accept(NodeVisitor visitor) => visitor.visitBinary(this); | 727 accept(NodeVisitor visitor) => visitor.visitBinary(this); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 | 943 |
| 942 accept(NodeVisitor visitor) => visitor.visitAccess(this); | 944 accept(NodeVisitor visitor) => visitor.visitAccess(this); |
| 943 | 945 |
| 944 void visitChildren(NodeVisitor visitor) { | 946 void visitChildren(NodeVisitor visitor) { |
| 945 receiver.accept(visitor); | 947 receiver.accept(visitor); |
| 946 selector.accept(visitor); | 948 selector.accept(visitor); |
| 947 } | 949 } |
| 948 | 950 |
| 949 PropertyAccess _clone() => new PropertyAccess(receiver, selector); | 951 PropertyAccess _clone() => new PropertyAccess(receiver, selector); |
| 950 | 952 |
| 951 int get precedenceLevel => CALL; | 953 int get precedenceLevel => ACCESS; |
| 952 } | 954 } |
| 953 | 955 |
| 954 abstract class Literal extends Expression { | 956 abstract class Literal extends Expression { |
| 955 void visitChildren(NodeVisitor visitor) {} | 957 void visitChildren(NodeVisitor visitor) {} |
| 956 | 958 |
| 957 int get precedenceLevel => PRIMARY; | 959 int get precedenceLevel => PRIMARY; |
| 958 } | 960 } |
| 959 | 961 |
| 960 class LiteralBool extends Literal { | 962 class LiteralBool extends Literal { |
| 961 final bool value; | 963 final bool value; |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 final Expression expression; | 1342 final Expression expression; |
| 1341 | 1343 |
| 1342 CommentExpression(this.comment, this.expression); | 1344 CommentExpression(this.comment, this.expression); |
| 1343 | 1345 |
| 1344 int get precedenceLevel => PRIMARY; | 1346 int get precedenceLevel => PRIMARY; |
| 1345 accept(NodeVisitor visitor) => visitor.visitCommentExpression(this); | 1347 accept(NodeVisitor visitor) => visitor.visitCommentExpression(this); |
| 1346 CommentExpression _clone() => new CommentExpression(comment, expression); | 1348 CommentExpression _clone() => new CommentExpression(comment, expression); |
| 1347 | 1349 |
| 1348 void visitChildren(NodeVisitor visitor) => expression.accept(visitor); | 1350 void visitChildren(NodeVisitor visitor) => expression.accept(visitor); |
| 1349 } | 1351 } |
| OLD | NEW |