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

Unified Diff: src/prettyprinter.cc

Issue 1309813007: [es6] implement destructuring assignment (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: An implementation Created 5 years, 1 month 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/typing-asm.cc » ('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 f50d5904d0a50ce0ed49c4de9c7121f8d03b7e0d..5aefe7c20217ec5d77db168d2679ad3794867c94 100644
--- a/src/prettyprinter.cc
+++ b/src/prettyprinter.cc
@@ -251,6 +251,11 @@ void CallPrinter::VisitRegExpLiteral(RegExpLiteral* node) {
}
+void CallPrinter::VisitAssignmentPattern(AssignmentPattern* node) {
+ Visit(node->pattern());
+}
+
+
void CallPrinter::VisitObjectLiteral(ObjectLiteral* node) {
for (int i = 0; i < node->properties()->length(); i++) {
Find(node->properties()->at(i)->value());
@@ -734,6 +739,11 @@ void PrettyPrinter::VisitRegExpLiteral(RegExpLiteral* node) {
}
+void PrettyPrinter::VisitAssignmentPattern(AssignmentPattern* node) {
+ Visit(node->pattern());
+}
+
+
void PrettyPrinter::VisitObjectLiteral(ObjectLiteral* node) {
Print("{ ");
for (int i = 0; i < node->properties()->length(); i++) {
@@ -1465,6 +1475,12 @@ void AstPrinter::VisitRegExpLiteral(RegExpLiteral* node) {
}
+void AstPrinter::VisitAssignmentPattern(AssignmentPattern* node) {
+ IndentedScope indent(this, "ASSIGNMENT PATTERN", node->position());
+ Visit(node->pattern());
+}
+
+
void AstPrinter::VisitObjectLiteral(ObjectLiteral* node) {
IndentedScope indent(this, "OBJ LITERAL", node->position());
EmbeddedVector<char, 128> buf;
« src/preparser.h ('K') | « src/preparser.h ('k') | src/typing-asm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698