| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdarg.h> | 5 #include <stdarg.h> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/ast-value-factory.h" | 9 #include "src/ast-value-factory.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 void CallPrinter::VisitFunctionDeclaration(FunctionDeclaration* node) {} | 100 void CallPrinter::VisitFunctionDeclaration(FunctionDeclaration* node) {} |
| 101 | 101 |
| 102 | 102 |
| 103 void CallPrinter::VisitModuleDeclaration(ModuleDeclaration* node) { | 103 void CallPrinter::VisitModuleDeclaration(ModuleDeclaration* node) { |
| 104 Find(node->module()); | 104 Find(node->module()); |
| 105 } | 105 } |
| 106 | 106 |
| 107 | 107 |
| 108 void CallPrinter::VisitImportDeclaration(ImportDeclaration* node) { | 108 void CallPrinter::VisitImportDeclaration(ImportDeclaration* node) { |
| 109 Find(node->module()); | |
| 110 } | 109 } |
| 111 | 110 |
| 112 | 111 |
| 113 void CallPrinter::VisitExportDeclaration(ExportDeclaration* node) {} | 112 void CallPrinter::VisitExportDeclaration(ExportDeclaration* node) {} |
| 114 | 113 |
| 115 | 114 |
| 116 void CallPrinter::VisitModuleLiteral(ModuleLiteral* node) { | 115 void CallPrinter::VisitModuleLiteral(ModuleLiteral* node) { |
| 117 VisitBlock(node->body()); | 116 VisitBlock(node->body()); |
| 118 } | 117 } |
| 119 | 118 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 Print(" = "); | 473 Print(" = "); |
| 475 Visit(node->module()); | 474 Visit(node->module()); |
| 476 Print(";"); | 475 Print(";"); |
| 477 } | 476 } |
| 478 | 477 |
| 479 | 478 |
| 480 void PrettyPrinter::VisitImportDeclaration(ImportDeclaration* node) { | 479 void PrettyPrinter::VisitImportDeclaration(ImportDeclaration* node) { |
| 481 Print("import "); | 480 Print("import "); |
| 482 PrintLiteral(node->proxy()->name(), false); | 481 PrintLiteral(node->proxy()->name(), false); |
| 483 Print(" from "); | 482 Print(" from "); |
| 484 Visit(node->module()); | 483 PrintLiteral(node->module_specifier()->string(), true); |
| 485 Print(";"); | 484 Print(";"); |
| 486 } | 485 } |
| 487 | 486 |
| 488 | 487 |
| 489 void PrettyPrinter::VisitExportDeclaration(ExportDeclaration* node) { | 488 void PrettyPrinter::VisitExportDeclaration(ExportDeclaration* node) { |
| 490 Print("export "); | 489 Print("export "); |
| 491 PrintLiteral(node->proxy()->name(), false); | 490 PrintLiteral(node->proxy()->name(), false); |
| 492 Print(";"); | 491 Print(";"); |
| 493 } | 492 } |
| 494 | 493 |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 void AstPrinter::VisitModuleDeclaration(ModuleDeclaration* node) { | 1205 void AstPrinter::VisitModuleDeclaration(ModuleDeclaration* node) { |
| 1207 IndentedScope indent(this, "MODULE"); | 1206 IndentedScope indent(this, "MODULE"); |
| 1208 PrintLiteralIndented("NAME", node->proxy()->name(), true); | 1207 PrintLiteralIndented("NAME", node->proxy()->name(), true); |
| 1209 Visit(node->module()); | 1208 Visit(node->module()); |
| 1210 } | 1209 } |
| 1211 | 1210 |
| 1212 | 1211 |
| 1213 void AstPrinter::VisitImportDeclaration(ImportDeclaration* node) { | 1212 void AstPrinter::VisitImportDeclaration(ImportDeclaration* node) { |
| 1214 IndentedScope indent(this, "IMPORT"); | 1213 IndentedScope indent(this, "IMPORT"); |
| 1215 PrintLiteralIndented("NAME", node->proxy()->name(), true); | 1214 PrintLiteralIndented("NAME", node->proxy()->name(), true); |
| 1216 Visit(node->module()); | 1215 PrintLiteralIndented("FROM", node->module_specifier()->string(), true); |
| 1217 } | 1216 } |
| 1218 | 1217 |
| 1219 | 1218 |
| 1220 void AstPrinter::VisitExportDeclaration(ExportDeclaration* node) { | 1219 void AstPrinter::VisitExportDeclaration(ExportDeclaration* node) { |
| 1221 IndentedScope indent(this, "EXPORT "); | 1220 IndentedScope indent(this, "EXPORT "); |
| 1222 PrintLiteral(node->proxy()->name(), true); | 1221 PrintLiteral(node->proxy()->name(), true); |
| 1223 } | 1222 } |
| 1224 | 1223 |
| 1225 | 1224 |
| 1226 void AstPrinter::VisitModuleLiteral(ModuleLiteral* node) { | 1225 void AstPrinter::VisitModuleLiteral(ModuleLiteral* node) { |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1579 } | 1578 } |
| 1580 | 1579 |
| 1581 | 1580 |
| 1582 void AstPrinter::VisitSuperReference(SuperReference* node) { | 1581 void AstPrinter::VisitSuperReference(SuperReference* node) { |
| 1583 IndentedScope indent(this, "SUPER-REFERENCE"); | 1582 IndentedScope indent(this, "SUPER-REFERENCE"); |
| 1584 } | 1583 } |
| 1585 | 1584 |
| 1586 #endif // DEBUG | 1585 #endif // DEBUG |
| 1587 | 1586 |
| 1588 } } // namespace v8::internal | 1587 } } // namespace v8::internal |
| OLD | NEW |