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

Unified Diff: sdk/lib/_internal/compiler/implementation/js/printer.dart

Issue 260233003: Remove js.Sequence and use binary comma operator instead. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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: sdk/lib/_internal/compiler/implementation/js/printer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js/printer.dart b/sdk/lib/_internal/compiler/implementation/js/printer.dart
index 38c9449ba582b223acdaea8a1b7fd30d72c46322..6d663bc5b99bdd16a89a34b4576bb7ed8bc2be56 100644
--- a/sdk/lib/_internal/compiler/implementation/js/printer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js/printer.dart
@@ -481,15 +481,6 @@ class Printer implements NodeVisitor {
newInForInit: inForInit, newAtStatementBegin: false);
}
- visitSequence(Sequence sequence) {
- // Note that we only require that the entries are expressions and not
- // assignments. This means that nested sequences are not put into
- // parenthesis.
- visitCommaSeparated(sequence.expressions, EXPRESSION,
- newInForInit: false,
- newAtStatementBegin: atStatementBegin);
- }
-
visitAssignment(Assignment assignment) {
visitNestedExpression(assignment.leftHandSide, LEFT_HAND_SIDE,
newInForInit: inForInit,
@@ -556,8 +547,9 @@ class Printer implements NodeVisitor {
bool leftSpace = true; // left<HERE>op right
switch (op) {
case ',':
+ // x, (y, z) <=> (x, y), z.
leftPrecedenceRequirement = EXPRESSION;
- rightPrecedenceRequirement = LOGICAL_OR;
+ rightPrecedenceRequirement = EXPRESSION;
leftSpace = false;
break;
case "||":
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js/nodes.dart ('k') | sdk/lib/_internal/compiler/implementation/js/template.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698