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

Unified Diff: frog/leg/tree/nodes.dart

Issue 9863037: Generate prettier loops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: frog/leg/tree/nodes.dart
diff --git a/frog/leg/tree/nodes.dart b/frog/leg/tree/nodes.dart
index 6b489f4eea5ca4240047a5270c7a042daa22b5ce..ca9b0eb1497c81c66b28756c4c81682e5665eb60 100644
--- a/frog/leg/tree/nodes.dart
+++ b/frog/leg/tree/nodes.dart
@@ -13,7 +13,7 @@ interface Visitor<R> {
R visitEmptyStatement(EmptyStatement node);
R visitExpressionStatement(ExpressionStatement node);
R visitFor(For node);
- R visitForInStatement(ForInStatement node);
+ R visitForIn(ForIn node);
R visitFunctionDeclaration(FunctionDeclaration node);
R visitFunctionExpression(FunctionExpression node);
R visitIdentifier(Identifier node);
@@ -117,7 +117,7 @@ class Node implements Hashable {
Expression asExpression() => null;
ExpressionStatement asExpressionStatement() => null;
For asFor() => null;
- ForInStatement asForInStatement() => null;
+ ForIn asForIn() => null;
FunctionDeclaration asFunctionDeclaration() => null;
FunctionExpression asFunctionExpression() => null;
Identifier asIdentifier() => null;
@@ -1409,21 +1409,21 @@ class ContinueStatement extends GotoStatement {
accept(Visitor visitor) => visitor.visitContinueStatement(this);
}
-class ForInStatement extends Loop {
+class ForIn extends Loop {
final Node declaredIdentifier;
final Expression expression;
final Token forToken;
final Token inToken;
- ForInStatement(this.declaredIdentifier, this.expression,
+ ForIn(this.declaredIdentifier, this.expression,
Statement body, this.forToken, this.inToken) : super(body);
Expression get condition() => null;
- ForInStatement asForInStatement() => this;
+ ForIn asForIn() => this;
- accept(Visitor visitor) => visitor.visitForInStatement(this);
+ accept(Visitor visitor) => visitor.visitForIn(this);
visitChildren(Visitor visitor) {
declaredIdentifier.accept(visitor);

Powered by Google App Engine
This is Rietveld 408576698