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

Side by Side Diff: lib/compiler/implementation/tree/visitors.dart

Issue 10392024: Add a "Label" Node around an Identifier that is being used as a label. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressede review comments. Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 class AbstractVisitor<R> implements Visitor<R> { 5 class AbstractVisitor<R> implements Visitor<R> {
6 const AbstractVisitor(); 6 const AbstractVisitor();
7 7
8 abstract R visitNode(Node node); 8 abstract R visitNode(Node node);
9 9
10 R visitBlock(Block node) => visitStatement(node); 10 R visitBlock(Block node) => visitStatement(node);
11 R visitBreakStatement(BreakStatement node) => visitGotoStatement(node); 11 R visitBreakStatement(BreakStatement node) => visitGotoStatement(node);
12 R visitCascade(Cascade node) => visitExpression(node); 12 R visitCascade(Cascade node) => visitExpression(node);
13 R visitCascadeReceiver(CascadeReceiver node) => visitExpression(node); 13 R visitCascadeReceiver(CascadeReceiver node) => visitExpression(node);
14 R visitCatchBlock(CatchBlock node) => visitNode(node); 14 R visitCatchBlock(CatchBlock node) => visitNode(node);
15 R visitClassNode(ClassNode node) => visitNode(node); 15 R visitClassNode(ClassNode node) => visitNode(node);
16 R visitConditional(Conditional node) => visitExpression(node); 16 R visitConditional(Conditional node) => visitExpression(node);
17 R visitContinueStatement(ContinueStatement node) => visitGotoStatement(node); 17 R visitContinueStatement(ContinueStatement node) => visitGotoStatement(node);
18 R visitDoWhile(DoWhile node) => visitLoop(node); 18 R visitDoWhile(DoWhile node) => visitLoop(node);
19 R visitEmptyStatement(EmptyStatement node) => visitStatement(node); 19 R visitEmptyStatement(EmptyStatement node) => visitStatement(node);
20 R visitExpression(Expression node) => visitNode(node); 20 R visitExpression(Expression node) => visitNode(node);
21 R visitExpressionStatement(ExpressionStatement node) => visitStatement(node); 21 R visitExpressionStatement(ExpressionStatement node) => visitStatement(node);
22 R visitFor(For node) => visitLoop(node); 22 R visitFor(For node) => visitLoop(node);
23 R visitForIn(ForIn node) => visitLoop(node); 23 R visitForIn(ForIn node) => visitLoop(node);
24 R visitFunctionDeclaration(FunctionDeclaration node) => visitStatement(node); 24 R visitFunctionDeclaration(FunctionDeclaration node) => visitStatement(node);
25 R visitFunctionExpression(FunctionExpression node) => visitExpression(node); 25 R visitFunctionExpression(FunctionExpression node) => visitExpression(node);
26 R visitGotoStatement(GotoStatement node) => visitStatement(node); 26 R visitGotoStatement(GotoStatement node) => visitStatement(node);
27 R visitIdentifier(Identifier node) => visitExpression(node); 27 R visitIdentifier(Identifier node) => visitExpression(node);
28 R visitIf(If node) => visitStatement(node); 28 R visitIf(If node) => visitStatement(node);
29 R visitLabel(Label node) => visitNode(node);
29 R visitLabeledStatement(LabeledStatement node) => visitStatement(node); 30 R visitLabeledStatement(LabeledStatement node) => visitStatement(node);
30 R visitLiteral(Literal node) => visitExpression(node); 31 R visitLiteral(Literal node) => visitExpression(node);
31 R visitLiteralBool(LiteralBool node) => visitLiteral(node); 32 R visitLiteralBool(LiteralBool node) => visitLiteral(node);
32 R visitLiteralDouble(LiteralDouble node) => visitLiteral(node); 33 R visitLiteralDouble(LiteralDouble node) => visitLiteral(node);
33 R visitLiteralInt(LiteralInt node) => visitLiteral(node); 34 R visitLiteralInt(LiteralInt node) => visitLiteral(node);
34 R visitLiteralList(LiteralList node) => visitExpression(node); 35 R visitLiteralList(LiteralList node) => visitExpression(node);
35 R visitLiteralMap(LiteralMap node) => visitExpression(node); 36 R visitLiteralMap(LiteralMap node) => visitExpression(node);
36 R visitLiteralMapEntry(LiteralMapEntry node) => visitNode(node); 37 R visitLiteralMapEntry(LiteralMapEntry node) => visitNode(node);
37 R visitLiteralNull(LiteralNull node) => visitLiteral(node); 38 R visitLiteralNull(LiteralNull node) => visitLiteral(node);
38 R visitLiteralString(LiteralString node) => visitStringNode(node); 39 R visitLiteralString(LiteralString node) => visitStringNode(node);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 class TraversingVisitor extends AbstractVisitor { 78 class TraversingVisitor extends AbstractVisitor {
78 final Visitor visitor; 79 final Visitor visitor;
79 80
80 TraversingVisitor(Visitor this.visitor); 81 TraversingVisitor(Visitor this.visitor);
81 82
82 visitNode(Node node) { 83 visitNode(Node node) {
83 node.accept(visitor); 84 node.accept(visitor);
84 node.visitChildren(this); 85 node.visitChildren(this);
85 } 86 }
86 } 87 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/tree/unparser.dart ('k') | lib/compiler/implementation/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698