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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 void AstPrinter::VisitLoadStaticFieldNode(LoadStaticFieldNode* node) { | 120 void AstPrinter::VisitLoadStaticFieldNode(LoadStaticFieldNode* node) { |
121 VisitGenericFieldNode(node, node->field()); | 121 VisitGenericFieldNode(node, node->field()); |
122 } | 122 } |
123 | 123 |
124 | 124 |
125 void AstPrinter::VisitStoreStaticFieldNode(StoreStaticFieldNode* node) { | 125 void AstPrinter::VisitStoreStaticFieldNode(StoreStaticFieldNode* node) { |
126 VisitGenericFieldNode(node, node->field()); | 126 VisitGenericFieldNode(node, node->field()); |
127 } | 127 } |
128 | 128 |
129 | 129 |
| 130 void AstPrinter::VisitLetNode(LetNode* node) { |
| 131 VisitGenericAstNode(node); |
| 132 } |
| 133 |
| 134 |
130 void AstPrinter::VisitArrayNode(ArrayNode* node) { | 135 void AstPrinter::VisitArrayNode(ArrayNode* node) { |
131 VisitGenericAstNode(node); | 136 VisitGenericAstNode(node); |
132 } | 137 } |
133 | 138 |
134 | 139 |
135 void AstPrinter::VisitLiteralNode(LiteralNode* node) { | 140 void AstPrinter::VisitLiteralNode(LiteralNode* node) { |
136 const Instance& literal = node->literal(); | 141 const Instance& literal = node->literal(); |
137 OS::Print("'%s'", literal.ToCString()); | 142 OS::Print("'%s'", literal.ToCString()); |
138 } | 143 } |
139 | 144 |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 ASSERT(node_sequence != NULL); | 503 ASSERT(node_sequence != NULL); |
499 AstPrinter ast_printer; | 504 AstPrinter ast_printer; |
500 const char* function_name = | 505 const char* function_name = |
501 parsed_function.function().ToFullyQualifiedCString(); | 506 parsed_function.function().ToFullyQualifiedCString(); |
502 OS::Print("Ast for function '%s' {\n", function_name); | 507 OS::Print("Ast for function '%s' {\n", function_name); |
503 node_sequence->Visit(&ast_printer); | 508 node_sequence->Visit(&ast_printer); |
504 OS::Print("}\n"); | 509 OS::Print("}\n"); |
505 } | 510 } |
506 | 511 |
507 } // namespace dart | 512 } // namespace dart |
OLD | NEW |