| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library polymer_expressions.visitor; | 5 library polymer_expressions.visitor; |
| 6 | 6 |
| 7 import 'expression.dart'; | 7 import 'expression.dart'; |
| 8 | 8 |
| 9 abstract class Visitor { | 9 abstract class Visitor { |
| 10 visit(Expression s) => s.accept(this); | 10 visit(Expression s) => s.accept(this); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 visitUnaryOperator(UnaryOperator o); | 21 visitUnaryOperator(UnaryOperator o); |
| 22 visitInExpression(InExpression c); | 22 visitInExpression(InExpression c); |
| 23 } | 23 } |
| 24 | 24 |
| 25 abstract class RecursiveVisitor extends Visitor { | 25 abstract class RecursiveVisitor extends Visitor { |
| 26 visitExpression(Expression e); | 26 visitExpression(Expression e); |
| 27 | 27 |
| 28 visitEmptyExpression(EmptyExpression e) => visitExpression(e); | 28 visitEmptyExpression(EmptyExpression e) => visitExpression(e); |
| 29 | 29 |
| 30 visitParenthesizedExpression(ParenthesizedExpression e) { | 30 visitParenthesizedExpression(ParenthesizedExpression e) { |
| 31 visit(e); | 31 visit(e.child); |
| 32 visitExpression(e); | 32 visitExpression(e); |
| 33 } | 33 } |
| 34 | 34 |
| 35 visitGetter(Getter i) { | 35 visitGetter(Getter i) { |
| 36 visit(i.receiver); | 36 visit(i.receiver); |
| 37 visitExpression(i); | 37 visitExpression(i); |
| 38 } | 38 } |
| 39 | 39 |
| 40 visitIndex(Index i) { | 40 visitIndex(Index i) { |
| 41 visit(i.receiver); | 41 visit(i.receiver); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 visit(o.child); | 80 visit(o.child); |
| 81 visitExpression(o); | 81 visitExpression(o); |
| 82 } | 82 } |
| 83 | 83 |
| 84 visitInExpression(InExpression c) { | 84 visitInExpression(InExpression c) { |
| 85 visit(c.left); | 85 visit(c.left); |
| 86 visit(c.right); | 86 visit(c.right); |
| 87 visitExpression(c); | 87 visitExpression(c); |
| 88 } | 88 } |
| 89 } | 89 } |
| OLD | NEW |