OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 test.backend.platform_selector.visitor; | |
6 | |
7 import 'ast.dart'; | 5 import 'ast.dart'; |
8 | 6 |
9 /// The interface for visitors of the platform selector AST. | 7 /// The interface for visitors of the platform selector AST. |
10 abstract class Visitor<T> { | 8 abstract class Visitor<T> { |
11 T visitVariable(VariableNode node); | 9 T visitVariable(VariableNode node); |
12 T visitNot(NotNode node); | 10 T visitNot(NotNode node); |
13 T visitOr(OrNode node); | 11 T visitOr(OrNode node); |
14 T visitAnd(AndNode node); | 12 T visitAnd(AndNode node); |
15 T visitConditional(ConditionalNode node); | 13 T visitConditional(ConditionalNode node); |
16 } | 14 } |
(...skipping 20 matching lines...) Expand all Loading... |
37 node.left.accept(this); | 35 node.left.accept(this); |
38 node.right.accept(this); | 36 node.right.accept(this); |
39 } | 37 } |
40 | 38 |
41 void visitConditional(ConditionalNode node) { | 39 void visitConditional(ConditionalNode node) { |
42 node.condition.accept(this); | 40 node.condition.accept(this); |
43 node.whenTrue.accept(this); | 41 node.whenTrue.accept(this); |
44 node.whenFalse.accept(this); | 42 node.whenFalse.accept(this); |
45 } | 43 } |
46 } | 44 } |
OLD | NEW |