Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/tree/nodes.dart

Issue 683803003: Support for loops in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder_visitor.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder_visitor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698