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