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

Side by Side Diff: frog/leg/tree/visitors.dart

Issue 9502002: Add FunctionDeclaration node. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « frog/leg/tree/unparser.dart ('k') | frog/leg/typechecker.dart » ('j') | 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) 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 abstract R visitNode(Node node); 6 abstract R visitNode(Node node);
7 7
8 R visitBlock(Block node) => visitStatement(node); 8 R visitBlock(Block node) => visitStatement(node);
9 R visitBreakStatement(BreakStatement node) => visitGotoStatement(node); 9 R visitBreakStatement(BreakStatement node) => visitGotoStatement(node);
10 R visitCatchBlock(CatchBlock node) => visitNode(node); 10 R visitCatchBlock(CatchBlock node) => visitNode(node);
11 R visitClassNode(ClassNode node) => visitNode(node); 11 R visitClassNode(ClassNode node) => visitNode(node);
12 R visitConditional(Conditional node) => visitExpression(node); 12 R visitConditional(Conditional node) => visitExpression(node);
13 R visitContinueStatement(ContinueStatement node) => visitGotoStatement(node); 13 R visitContinueStatement(ContinueStatement node) => visitGotoStatement(node);
14 R visitDoWhile(DoWhile node) => visitLoop(node); 14 R visitDoWhile(DoWhile node) => visitLoop(node);
15 R visitEmptyStatement(EmptyStatement node) => visitStatement(node); 15 R visitEmptyStatement(EmptyStatement node) => visitStatement(node);
16 R visitExpression(Expression node) => visitNode(node); 16 R visitExpression(Expression node) => visitNode(node);
17 R visitExpressionStatement(ExpressionStatement node) => visitStatement(node); 17 R visitExpressionStatement(ExpressionStatement node) => visitStatement(node);
18 R visitFor(For node) => visitLoop(node); 18 R visitFor(For node) => visitLoop(node);
19 R visitForInStatement(ForInStatement node) => visitLoop(node); 19 R visitForInStatement(ForInStatement node) => visitLoop(node);
20 R visitFunctionDeclaration(FunctionDeclaration node) => visitStatement(node);
20 R visitFunctionExpression(FunctionExpression node) => visitExpression(node); 21 R visitFunctionExpression(FunctionExpression node) => visitExpression(node);
21 R visitGotoStatement(GotoStatement node) => visitStatement(node); 22 R visitGotoStatement(GotoStatement node) => visitStatement(node);
22 R visitIdentifier(Identifier node) => visitExpression(node); 23 R visitIdentifier(Identifier node) => visitExpression(node);
23 R visitIf(If node) => visitStatement(node); 24 R visitIf(If node) => visitStatement(node);
24 R visitLabelledStatement(LabelledStatement node) => visitStatement(node); 25 R visitLabelledStatement(LabelledStatement node) => visitStatement(node);
25 R visitLiteral(Literal node) => visitExpression(node); 26 R visitLiteral(Literal node) => visitExpression(node);
26 R visitLiteralBool(LiteralBool node) => visitLiteral(node); 27 R visitLiteralBool(LiteralBool node) => visitLiteral(node);
27 R visitLiteralDouble(LiteralDouble node) => visitLiteral(node); 28 R visitLiteralDouble(LiteralDouble node) => visitLiteral(node);
28 R visitLiteralInt(LiteralInt node) => visitLiteral(node); 29 R visitLiteralInt(LiteralInt node) => visitLiteral(node);
29 R visitLiteralList(LiteralList node) => visitExpression(node); 30 R visitLiteralList(LiteralList node) => visitExpression(node);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 class TraversingVisitor extends AbstractVisitor { 69 class TraversingVisitor extends AbstractVisitor {
69 final Visitor visitor; 70 final Visitor visitor;
70 71
71 TraversingVisitor(Visitor this.visitor); 72 TraversingVisitor(Visitor this.visitor);
72 73
73 visitNode(Node node) { 74 visitNode(Node node) {
74 node.accept(visitor); 75 node.accept(visitor);
75 node.visitChildren(this); 76 node.visitChildren(this);
76 } 77 }
77 } 78 }
OLDNEW
« no previous file with comments | « frog/leg/tree/unparser.dart ('k') | frog/leg/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698