| 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 tree; | 5 part of tree; |
| 6 | 6 |
| 7 abstract class Visitor<R> { | 7 abstract class Visitor<R> { |
| 8 const Visitor(); | 8 const Visitor(); |
| 9 | 9 |
| 10 R visitNode(Node node); | 10 R visitNode(Node node); |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 final NodeList update; | 660 final NodeList update; |
| 661 | 661 |
| 662 final Token forToken; | 662 final Token forToken; |
| 663 | 663 |
| 664 For(this.initializer, this.conditionStatement, this.update, body, | 664 For(this.initializer, this.conditionStatement, this.update, body, |
| 665 this.forToken) : super(body); | 665 this.forToken) : super(body); |
| 666 | 666 |
| 667 For asFor() => this; | 667 For asFor() => this; |
| 668 | 668 |
| 669 Expression get condition { | 669 Expression get condition { |
| 670 if (conditionStatement is ExpressionStatement) { | 670 ExpressionStatement expressionStatement = |
| 671 return conditionStatement.asExpressionStatement().expression; | 671 conditionStatement.asExpressionStatement(); |
| 672 if (expressionStatement != null) { |
| 673 return expressionStatement.expression; |
| 672 } else { | 674 } else { |
| 673 return null; | 675 return null; |
| 674 } | 676 } |
| 675 } | 677 } |
| 676 | 678 |
| 677 accept(Visitor visitor) => visitor.visitFor(this); | 679 accept(Visitor visitor) => visitor.visitFor(this); |
| 678 | 680 |
| 679 visitChildren(Visitor visitor) { | 681 visitChildren(Visitor visitor) { |
| 680 if (initializer != null) initializer.accept(visitor); | 682 if (initializer != null) initializer.accept(visitor); |
| 681 if (conditionStatement != null) conditionStatement.accept(visitor); | 683 if (conditionStatement != null) conditionStatement.accept(visitor); |
| (...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2178 | 2180 |
| 2179 // VariableDefinitions. | 2181 // VariableDefinitions. |
| 2180 get metadata => null; | 2182 get metadata => null; |
| 2181 get type => null; | 2183 get type => null; |
| 2182 | 2184 |
| 2183 // Typedef. | 2185 // Typedef. |
| 2184 get typeParameters => null; | 2186 get typeParameters => null; |
| 2185 get formals => null; | 2187 get formals => null; |
| 2186 get typedefKeyword => null; | 2188 get typedefKeyword => null; |
| 2187 } | 2189 } |
| OLD | NEW |