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

Side by Side Diff: runtime/vm/ast_printer.cc

Issue 447003003: Introduce await (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments Created 6 years, 4 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 | « runtime/vm/ast.h ('k') | runtime/vm/ast_transformer.h » ('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 #include "vm/ast_printer.h" 5 #include "vm/ast_printer.h"
6 6
7 #include "vm/handles.h" 7 #include "vm/handles.h"
8 #include "vm/object.h" 8 #include "vm/object.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 #include "vm/parser.h" 10 #include "vm/parser.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 const String& dst_name = node->dst_name(); 145 const String& dst_name = node->dst_name();
146 OS::Print("(%s (type \"%s\") (of \"%s\") ", 146 OS::Print("(%s (type \"%s\") (of \"%s\") ",
147 node->PrettyName(), 147 node->PrettyName(),
148 String::Handle(type.Name()).ToCString(), 148 String::Handle(type.Name()).ToCString(),
149 dst_name.ToCString()); 149 dst_name.ToCString());
150 node->VisitChildren(this); 150 node->VisitChildren(this);
151 OS::Print(")"); 151 OS::Print(")");
152 } 152 }
153 153
154 154
155 void AstPrinter::VisitAwaitNode(AwaitNode* node) {
156 VisitGenericAstNode(node);
157 }
158
159
155 void AstPrinter::VisitPrimaryNode(PrimaryNode* node) { 160 void AstPrinter::VisitPrimaryNode(PrimaryNode* node) {
156 OS::Print("*****%s***** \"%s\")", 161 OS::Print("*****%s***** \"%s\")",
157 node->PrettyName(), 162 node->PrettyName(),
158 node->primary().ToCString()); 163 node->primary().ToCString());
159 } 164 }
160 165
161 166
162 void AstPrinter::VisitComparisonNode(ComparisonNode* node) { 167 void AstPrinter::VisitComparisonNode(ComparisonNode* node) {
163 OS::Print("(%s %s ", node->PrettyName(), node->TokenName()); 168 OS::Print("(%s %s ", node->PrettyName(), node->TokenName());
164 node->VisitChildren(this); 169 node->VisitChildren(this);
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 ASSERT(node_sequence != NULL); 499 ASSERT(node_sequence != NULL);
495 AstPrinter ast_printer; 500 AstPrinter ast_printer;
496 const char* function_name = 501 const char* function_name =
497 parsed_function.function().ToFullyQualifiedCString(); 502 parsed_function.function().ToFullyQualifiedCString();
498 OS::Print("Ast for function '%s' {\n", function_name); 503 OS::Print("Ast for function '%s' {\n", function_name);
499 node_sequence->Visit(&ast_printer); 504 node_sequence->Visit(&ast_printer);
500 OS::Print("}\n"); 505 OS::Print("}\n");
501 } 506 }
502 507
503 } // namespace dart 508 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/ast_transformer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698