OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |