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

Unified Diff: pkg/compiler/lib/src/tree/unparser.dart

Issue 1151163004: Implementation of null-aware operators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/compiler/lib/src/tree/nodes.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/tree/unparser.dart
diff --git a/pkg/compiler/lib/src/tree/unparser.dart b/pkg/compiler/lib/src/tree/unparser.dart
index 21051596b016f60fbe6b3096cfb19e9f0c5b851e..b7d31098a3a8f2845148da5adb0e795974602fb3 100644
--- a/pkg/compiler/lib/src/tree/unparser.dart
+++ b/pkg/compiler/lib/src/tree/unparser.dart
@@ -424,7 +424,7 @@ class Unparser extends Indentation implements Visitor {
indentLess();
indentLess();
} else if (node.selector.asOperator() == null) {
- write('.');
+ write(node.isConditional ? '?.' : '.');
} else if (spacesNeeded) {
write(' ');
}
« no previous file with comments | « pkg/compiler/lib/src/tree/nodes.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698