| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 301 |
| 302 void AstPrinter::VisitInstanceSetterNode(InstanceSetterNode* node) { | 302 void AstPrinter::VisitInstanceSetterNode(InstanceSetterNode* node) { |
| 303 OS::Print("(%s \"%s\" ", | 303 OS::Print("(%s \"%s\" ", |
| 304 node->PrettyName(), | 304 node->PrettyName(), |
| 305 node->field_name().ToCString()); | 305 node->field_name().ToCString()); |
| 306 node->VisitChildren(this); | 306 node->VisitChildren(this); |
| 307 OS::Print(")"); | 307 OS::Print(")"); |
| 308 } | 308 } |
| 309 | 309 |
| 310 | 310 |
| 311 void AstPrinter::VisitInitStaticFieldNode(InitStaticFieldNode* node) { |
| 312 OS::Print("(%s \"%s\")", node->PrettyName(), |
| 313 String::Handle(node->field().name()).ToCString()); |
| 314 } |
| 315 |
| 316 |
| 311 void AstPrinter::VisitStaticGetterNode(StaticGetterNode* node) { | 317 void AstPrinter::VisitStaticGetterNode(StaticGetterNode* node) { |
| 312 String& class_name = String::Handle(node->cls().Name()); | 318 String& class_name = String::Handle(node->cls().Name()); |
| 313 OS::Print("(%s \"%s.%s\")", | 319 OS::Print("(%s \"%s.%s\")", |
| 314 node->PrettyName(), | 320 node->PrettyName(), |
| 315 class_name.ToCString(), | 321 class_name.ToCString(), |
| 316 node->field_name().ToCString()); | 322 node->field_name().ToCString()); |
| 317 } | 323 } |
| 318 | 324 |
| 319 | 325 |
| 320 void AstPrinter::VisitStaticSetterNode(StaticSetterNode* node) { | 326 void AstPrinter::VisitStaticSetterNode(StaticSetterNode* node) { |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 ASSERT(node_sequence != NULL); | 500 ASSERT(node_sequence != NULL); |
| 495 AstPrinter ast_printer; | 501 AstPrinter ast_printer; |
| 496 const char* function_name = | 502 const char* function_name = |
| 497 parsed_function.function().ToFullyQualifiedCString(); | 503 parsed_function.function().ToFullyQualifiedCString(); |
| 498 OS::Print("Ast for function '%s' {\n", function_name); | 504 OS::Print("Ast for function '%s' {\n", function_name); |
| 499 node_sequence->Visit(&ast_printer); | 505 node_sequence->Visit(&ast_printer); |
| 500 OS::Print("}\n"); | 506 OS::Print("}\n"); |
| 501 } | 507 } |
| 502 | 508 |
| 503 } // namespace dart | 509 } // namespace dart |
| OLD | NEW |