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

Unified Diff: pkg/js_ast/lib/src/printer.dart

Issue 1681863003: dart2js: Distinguish precedence levels for left-hand side and call. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update status file Created 4 years, 10 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
« no previous file with comments | « pkg/js_ast/lib/src/precedence.dart ('k') | tests/html/html.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/js_ast/lib/src/printer.dart
diff --git a/pkg/js_ast/lib/src/printer.dart b/pkg/js_ast/lib/src/printer.dart
index edd4189d3afd5e5b22713b05b6523aa2bb918421..564a467afb0aa339038de3d4b17e04e97be60301 100644
--- a/pkg/js_ast/lib/src/printer.dart
+++ b/pkg/js_ast/lib/src/printer.dart
@@ -678,7 +678,7 @@ class Printer implements NodeVisitor {
@override
visitAssignment(Assignment assignment) {
- visitNestedExpression(assignment.leftHandSide, LEFT_HAND_SIDE,
+ visitNestedExpression(assignment.leftHandSide, CALL,
newInForInit: inForInit,
newAtStatementBegin: atStatementBegin);
if (assignment.value != null) {
@@ -719,7 +719,7 @@ class Printer implements NodeVisitor {
@override
visitNew(New node) {
out("new ");
- visitNestedExpression(node.target, CALL,
+ visitNestedExpression(node.target, LEFT_HAND_SIDE,
newInForInit: inForInit, newAtStatementBegin: false);
out("(");
visitCommaSeparated(node.arguments, ASSIGNMENT,
@@ -729,7 +729,7 @@ class Printer implements NodeVisitor {
@override
visitCall(Call call) {
- visitNestedExpression(call.target, LEFT_HAND_SIDE,
+ visitNestedExpression(call.target, CALL,
newInForInit: inForInit,
newAtStatementBegin: atStatementBegin);
out("(");
@@ -872,7 +872,7 @@ class Printer implements NodeVisitor {
@override
void visitPostfix(Postfix postfix) {
- visitNestedExpression(postfix.argument, LEFT_HAND_SIDE,
+ visitNestedExpression(postfix.argument, CALL,
newInForInit: inForInit,
newAtStatementBegin: atStatementBegin);
out(postfix.op);
« no previous file with comments | « pkg/js_ast/lib/src/precedence.dart ('k') | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698