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

Side by Side Diff: src/prettyprinter.cc

Issue 1286383005: Parse arrow functions at proper precedence level (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Fix nits 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 unified diff | Download patch
« no previous file with comments | « src/preparser.h ('k') | src/typing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/prettyprinter.h" 5 #include "src/prettyprinter.h"
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 8
9 #include "src/ast-value-factory.h" 9 #include "src/ast-value-factory.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 } 353 }
354 354
355 355
356 void CallPrinter::VisitSpread(Spread* node) { 356 void CallPrinter::VisitSpread(Spread* node) {
357 Print("(..."); 357 Print("(...");
358 Find(node->expression(), true); 358 Find(node->expression(), true);
359 Print(")"); 359 Print(")");
360 } 360 }
361 361
362 362
363 void CallPrinter::VisitEmptyParentheses(EmptyParentheses* node) {
364 UNREACHABLE();
365 }
366
367
363 void CallPrinter::VisitThisFunction(ThisFunction* node) {} 368 void CallPrinter::VisitThisFunction(ThisFunction* node) {}
364 369
365 370
366 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {} 371 void CallPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {}
367 372
368 373
369 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) {} 374 void CallPrinter::VisitSuperCallReference(SuperCallReference* node) {}
370 375
371 376
372 void CallPrinter::FindStatements(ZoneList<Statement*>* statements) { 377 void CallPrinter::FindStatements(ZoneList<Statement*>* statements) {
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 } 843 }
839 844
840 845
841 void PrettyPrinter::VisitSpread(Spread* node) { 846 void PrettyPrinter::VisitSpread(Spread* node) {
842 Print("(..."); 847 Print("(...");
843 Visit(node->expression()); 848 Visit(node->expression());
844 Print(")"); 849 Print(")");
845 } 850 }
846 851
847 852
853 void PrettyPrinter::VisitEmptyParentheses(EmptyParentheses* node) {
854 Print("<empty-parentheses>");
855 }
856
857
848 void PrettyPrinter::VisitThisFunction(ThisFunction* node) { 858 void PrettyPrinter::VisitThisFunction(ThisFunction* node) {
849 Print("<this-function>"); 859 Print("<this-function>");
850 } 860 }
851 861
852 862
853 void PrettyPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { 863 void PrettyPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {
854 Print("<super-property-reference>"); 864 Print("<super-property-reference>");
855 } 865 }
856 866
857 867
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 Visit(node->right()); 1568 Visit(node->right());
1559 } 1569 }
1560 1570
1561 1571
1562 void AstPrinter::VisitSpread(Spread* node) { 1572 void AstPrinter::VisitSpread(Spread* node) {
1563 IndentedScope indent(this, "..."); 1573 IndentedScope indent(this, "...");
1564 Visit(node->expression()); 1574 Visit(node->expression());
1565 } 1575 }
1566 1576
1567 1577
1578 void AstPrinter::VisitEmptyParentheses(EmptyParentheses* node) {
1579 IndentedScope indent(this, "()");
1580 }
1581
1582
1568 void AstPrinter::VisitThisFunction(ThisFunction* node) { 1583 void AstPrinter::VisitThisFunction(ThisFunction* node) {
1569 IndentedScope indent(this, "THIS-FUNCTION"); 1584 IndentedScope indent(this, "THIS-FUNCTION");
1570 } 1585 }
1571 1586
1572 1587
1573 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) { 1588 void AstPrinter::VisitSuperPropertyReference(SuperPropertyReference* node) {
1574 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE"); 1589 IndentedScope indent(this, "SUPER-PROPERTY-REFERENCE");
1575 } 1590 }
1576 1591
1577 1592
1578 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) { 1593 void AstPrinter::VisitSuperCallReference(SuperCallReference* node) {
1579 IndentedScope indent(this, "SUPER-CALL-REFERENCE"); 1594 IndentedScope indent(this, "SUPER-CALL-REFERENCE");
1580 } 1595 }
1581 1596
1582 1597
1583 #endif // DEBUG 1598 #endif // DEBUG
1584 1599
1585 } // namespace internal 1600 } // namespace internal
1586 } // namespace v8 1601 } // namespace v8
OLDNEW
« no previous file with comments | « src/preparser.h ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698