| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 void AstPrinter::VisitLetNode(LetNode* node) { | 117 void AstPrinter::VisitLetNode(LetNode* node) { |
| 118 VisitGenericAstNode(node); | 118 VisitGenericAstNode(node); |
| 119 } | 119 } |
| 120 | 120 |
| 121 | 121 |
| 122 void AstPrinter::VisitArrayNode(ArrayNode* node) { | 122 void AstPrinter::VisitArrayNode(ArrayNode* node) { |
| 123 VisitGenericAstNode(node); | 123 VisitGenericAstNode(node); |
| 124 } | 124 } |
| 125 | 125 |
| 126 | 126 |
| 127 void AstPrinter::VisitStringInterpolateNode(StringInterpolateNode* node) { |
| 128 VisitGenericAstNode(node); |
| 129 } |
| 130 |
| 131 |
| 127 void AstPrinter::VisitLiteralNode(LiteralNode* node) { | 132 void AstPrinter::VisitLiteralNode(LiteralNode* node) { |
| 128 const Instance& literal = node->literal(); | 133 const Instance& literal = node->literal(); |
| 129 OS::Print("(%s \"%s\")", node->PrettyName(), literal.ToCString()); | 134 OS::Print("(%s \"%s\")", node->PrettyName(), literal.ToCString()); |
| 130 } | 135 } |
| 131 | 136 |
| 132 | 137 |
| 133 void AstPrinter::VisitTypeNode(TypeNode* node) { | 138 void AstPrinter::VisitTypeNode(TypeNode* node) { |
| 134 const AbstractType& type = node->type(); | 139 const AbstractType& type = node->type(); |
| 135 OS::Print("(%s \"%s\")", | 140 OS::Print("(%s \"%s\")", |
| 136 node->PrettyName(), | 141 node->PrettyName(), |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 ASSERT(node_sequence != NULL); | 489 ASSERT(node_sequence != NULL); |
| 485 AstPrinter ast_printer; | 490 AstPrinter ast_printer; |
| 486 const char* function_name = | 491 const char* function_name = |
| 487 parsed_function.function().ToFullyQualifiedCString(); | 492 parsed_function.function().ToFullyQualifiedCString(); |
| 488 OS::Print("Ast for function '%s' {\n", function_name); | 493 OS::Print("Ast for function '%s' {\n", function_name); |
| 489 node_sequence->Visit(&ast_printer); | 494 node_sequence->Visit(&ast_printer); |
| 490 OS::Print("}\n"); | 495 OS::Print("}\n"); |
| 491 } | 496 } |
| 492 | 497 |
| 493 } // namespace dart | 498 } // namespace dart |
| OLD | NEW |