| Index: src/prettyprinter.cc
|
| diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc
|
| index d879da15d84a7bf549ef53c0b2df0374d255cdbd..0d8dadce1a0257f7eef04fe12ade67cd157dd62c 100644
|
| --- a/src/prettyprinter.cc
|
| +++ b/src/prettyprinter.cc
|
| @@ -83,6 +83,22 @@ void PrettyPrinter::VisitModuleDeclaration(ModuleDeclaration* node) {
|
| }
|
|
|
|
|
| +void PrettyPrinter::VisitImportDeclaration(ImportDeclaration* node) {
|
| + Print("import ");
|
| + PrintLiteral(node->proxy()->name(), false);
|
| + Print(" from ");
|
| + Visit(node->module());
|
| + Print(";");
|
| +}
|
| +
|
| +
|
| +void PrettyPrinter::VisitExportDeclaration(ExportDeclaration* node) {
|
| + Print("export ");
|
| + PrintLiteral(node->proxy()->name(), false);
|
| + Print(";");
|
| +}
|
| +
|
| +
|
| void PrettyPrinter::VisitModuleLiteral(ModuleLiteral* node) {
|
| VisitBlock(node->body());
|
| }
|
| @@ -771,6 +787,19 @@ void AstPrinter::VisitModuleDeclaration(ModuleDeclaration* node) {
|
| }
|
|
|
|
|
| +void AstPrinter::VisitImportDeclaration(ImportDeclaration* node) {
|
| + IndentedScope indent(this, "IMPORT");
|
| + PrintLiteralIndented("NAME", node->proxy()->name(), true);
|
| + Visit(node->module());
|
| +}
|
| +
|
| +
|
| +void AstPrinter::VisitExportDeclaration(ExportDeclaration* node) {
|
| + IndentedScope indent(this, "EXPORT ");
|
| + PrintLiteral(node->proxy()->name(), true);
|
| +}
|
| +
|
| +
|
| void AstPrinter::VisitModuleLiteral(ModuleLiteral* node) {
|
| VisitBlock(node->body());
|
| }
|
|
|