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

Unified Diff: lib/compiler/implementation/tree/unparser.dart

Issue 10826245: Fix some operator madness (see incr_op_test for more details.) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« no previous file with comments | « no previous file | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/tree/unparser.dart
diff --git a/lib/compiler/implementation/tree/unparser.dart b/lib/compiler/implementation/tree/unparser.dart
index 31f05145db6491a1af09dd974d8ecd5334ebf87a..3ec9e200c710976fed4142b55f12c38815e7c87d 100644
--- a/lib/compiler/implementation/tree/unparser.dart
+++ b/lib/compiler/implementation/tree/unparser.dart
@@ -300,11 +300,23 @@ class Unparser implements Visitor {
unparseIndexedSet(node);
} else {
if (node.isPrefix) {
- add(node.assignmentOperator.token.value);
+ sb.add(' ');
+ add(node.assignmentOperator.source);
+ }
+ if (node.receiver !== null && rename(node.receiver) != '') {
+ visit(node.receiver);
+ CascadeReceiver asCascadeReceiver = node.receiver.asCascadeReceiver();
+ if (asCascadeReceiver !== null) {
+ add(asCascadeReceiver.cascadeOperator.value);
+ } else {
+ sb.add('.');
+ }
}
- unparseSendPart(node);
+ visit(node.selector);
if (!node.isPrefix) {
- add(node.assignmentOperator.token.value);
+ SourceString source = node.assignmentOperator.source;
+ add(source);
+ if (source.slowToString() != '=') sb.add(' ');
}
visit(node.argumentsNode);
}
« no previous file with comments | « no previous file | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698