Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1209)

Unified Diff: src/prettyprinter.cc

Issue 12646003: Add parser support for generators. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Fix bad initialization list in last preparser commit Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/prettyprinter.cc
diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc
index df6183a3662b8e4416034cb1cb0075dc02da4d68..50a71ced3d2998fd9c4fad68ceb606e206f2beb8 100644
--- a/src/prettyprinter.cc
+++ b/src/prettyprinter.cc
@@ -353,6 +353,12 @@ void PrettyPrinter::VisitAssignment(Assignment* node) {
}
+void PrettyPrinter::VisitYield(Yield* node) {
+ Print("yield ");
+ Visit(node->expression());
+}
+
+
void PrettyPrinter::VisitThrow(Throw* node) {
Print("throw ");
Visit(node->exception());
@@ -1059,6 +1065,11 @@ void AstPrinter::VisitAssignment(Assignment* node) {
}
+void AstPrinter::VisitYield(Yield* node) {
+ PrintIndentedVisit("YIELD", node->expression());
+}
+
+
void AstPrinter::VisitThrow(Throw* node) {
PrintIndentedVisit("THROW", node->exception());
}
« no previous file with comments | « src/preparser.cc ('k') | src/scanner.h » ('j') | test/mjsunit/harmony/generators-parsing.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698