Index: src/prettyprinter.cc |
diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc |
index 3a1eca7c6b1759b55312fddd5b92b9f609050409..23cad956927686ea98f7664f49a66ff288988196 100644 |
--- a/src/prettyprinter.cc |
+++ b/src/prettyprinter.cc |
@@ -255,6 +255,17 @@ void PrettyPrinter::VisitForInStatement(ForInStatement* node) { |
} |
+void PrettyPrinter::VisitForOfStatement(ForOfStatement* node) { |
+ PrintLabels(node->labels()); |
+ Print("for ("); |
+ Visit(node->each()); |
+ Print(" of "); |
+ Visit(node->iterable()); |
+ Print(") "); |
+ Visit(node->body()); |
+} |
+ |
+ |
void PrettyPrinter::VisitTryCatchStatement(TryCatchStatement* node) { |
Print("try "); |
Visit(node->try_block()); |
@@ -929,6 +940,14 @@ void AstPrinter::VisitForInStatement(ForInStatement* node) { |
} |
+void AstPrinter::VisitForOfStatement(ForOfStatement* node) { |
+ IndentedScope indent(this, "FOR OF"); |
+ PrintIndentedVisit("FOR", node->each()); |
+ PrintIndentedVisit("OF", node->iterable()); |
+ PrintIndentedVisit("BODY", node->body()); |
+} |
+ |
+ |
void AstPrinter::VisitTryCatchStatement(TryCatchStatement* node) { |
IndentedScope indent(this, "TRY CATCH"); |
PrintIndentedVisit("TRY", node->try_block()); |