Index: src/prettyprinter.cc |
diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc |
index f18b3203edc098ba4630c47006511ebb39e43d81..b03429341e3817ed0a4c85af813b858b07ef7836 100644 |
--- a/src/prettyprinter.cc |
+++ b/src/prettyprinter.cc |
@@ -123,11 +123,11 @@ void PrettyPrinter::VisitReturnStatement(ReturnStatement* node) { |
} |
-void PrettyPrinter::VisitEnterWithContextStatement( |
- EnterWithContextStatement* node) { |
- Print("<enter with context> ("); |
+void PrettyPrinter::VisitWithStatement(WithStatement* node) { |
+ Print("with ("); |
Visit(node->expression()); |
Print(") "); |
+ Visit(node->statement()); |
} |
@@ -798,9 +798,10 @@ void AstPrinter::VisitReturnStatement(ReturnStatement* node) { |
} |
-void AstPrinter::VisitEnterWithContextStatement( |
- EnterWithContextStatement* node) { |
- PrintIndentedVisit("ENTER WITH CONTEXT", node->expression()); |
+void AstPrinter::VisitWithStatement(WithStatement* node) { |
+ IndentedScope indent(this, "WITH"); |
+ PrintIndentedVisit("OBJECT", node->expression()); |
+ PrintIndentedVisit("BODY", node->statement()); |
} |
@@ -1194,10 +1195,10 @@ void JsonAstBuilder::VisitReturnStatement(ReturnStatement* stmt) { |
} |
-void JsonAstBuilder::VisitEnterWithContextStatement( |
- EnterWithContextStatement* stmt) { |
- TagScope tag(this, "EnterWithContextStatement"); |
+void JsonAstBuilder::VisitWithStatement(WithStatement* stmt) { |
+ TagScope tag(this, "WithStatement"); |
Visit(stmt->expression()); |
+ Visit(stmt->statement()); |
} |