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

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: 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
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) {
hausner 2014/08/07 21:48:41 You can call VisitGenericAstNode(node) here instea
Michael Lippautz (Google) 2014/08/08 18:12:17 Done.
156 OS::Print("(%s ", node->PrettyName());
157 node->VisitChildren(this);
158 OS::Print(")");
159 }
160
161
155 void AstPrinter::VisitPrimaryNode(PrimaryNode* node) { 162 void AstPrinter::VisitPrimaryNode(PrimaryNode* node) {
156 OS::Print("*****%s***** \"%s\")", 163 OS::Print("*****%s***** \"%s\")",
157 node->PrettyName(), 164 node->PrettyName(),
158 node->primary().ToCString()); 165 node->primary().ToCString());
159 } 166 }
160 167
161 168
162 void AstPrinter::VisitComparisonNode(ComparisonNode* node) { 169 void AstPrinter::VisitComparisonNode(ComparisonNode* node) {
163 OS::Print("(%s %s ", node->PrettyName(), node->TokenName()); 170 OS::Print("(%s %s ", node->PrettyName(), node->TokenName());
164 node->VisitChildren(this); 171 node->VisitChildren(this);
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 ASSERT(node_sequence != NULL); 501 ASSERT(node_sequence != NULL);
495 AstPrinter ast_printer; 502 AstPrinter ast_printer;
496 const char* function_name = 503 const char* function_name =
497 parsed_function.function().ToFullyQualifiedCString(); 504 parsed_function.function().ToFullyQualifiedCString();
498 OS::Print("Ast for function '%s' {\n", function_name); 505 OS::Print("Ast for function '%s' {\n", function_name);
499 node_sequence->Visit(&ast_printer); 506 node_sequence->Visit(&ast_printer);
500 OS::Print("}\n"); 507 OS::Print("}\n");
501 } 508 }
502 509
503 } // namespace dart 510 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/ast_transformer.h » ('j') | runtime/vm/ast_transformer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698