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

Unified Diff: src/prettyprinter.cc

Issue 1272673003: [es6] Re-implement rest parameters via desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase + fix brokenness Created 5 years, 4 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
« src/preparser.h ('K') | « src/preparser.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/prettyprinter.cc
diff --git a/src/prettyprinter.cc b/src/prettyprinter.cc
index c5ac881be298805f18baa9bc40f498492b327e2f..a878e1a48372b592ab2d56a2c217a9cf3e157610 100644
--- a/src/prettyprinter.cc
+++ b/src/prettyprinter.cc
@@ -264,6 +264,12 @@ void CallPrinter::VisitVariableProxy(VariableProxy* node) {
}
+void CallPrinter::VisitRestParameter(RestParameter* node) {
+ Print("...");
+ PrintLiteral(node->parameter()->name(), false);
+}
+
+
void CallPrinter::VisitAssignment(Assignment* node) {
Find(node->target());
Find(node->value());
@@ -749,6 +755,12 @@ void PrettyPrinter::VisitVariableProxy(VariableProxy* node) {
}
+void PrettyPrinter::VisitRestParameter(RestParameter* node) {
+ Print("...");
+ PrintLiteral(node->parameter()->name(), false);
+}
+
+
void PrettyPrinter::VisitAssignment(Assignment* node) {
Visit(node->target());
Print(" %s ", Token::String(node->op()));
@@ -1479,6 +1491,11 @@ void AstPrinter::VisitVariableProxy(VariableProxy* node) {
}
+void AstPrinter::VisitRestParameter(RestParameter* node) {
+ Visit(node->parameter());
+}
+
+
void AstPrinter::VisitAssignment(Assignment* node) {
IndentedScope indent(this, Token::Name(node->op()));
Visit(node->target());
« src/preparser.h ('K') | « src/preparser.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698