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

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

Issue 10870066: Support unary - operator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix unparser to handle that negate is no longer a keyword. 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 | « dart/lib/compiler/implementation/ssa/builder.dart ('k') | dart/lib/compiler/implementation/universe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/tree/unparser.dart
diff --git a/dart/lib/compiler/implementation/tree/unparser.dart b/dart/lib/compiler/implementation/tree/unparser.dart
index 0e092d5fa9beb42ce01b4103171adb6315c9dc35..3e35c289b6f917e498b31e83cd6ae32a150e8dde 100644
--- a/dart/lib/compiler/implementation/tree/unparser.dart
+++ b/dart/lib/compiler/implementation/tree/unparser.dart
@@ -142,7 +142,11 @@ class Unparser implements Visitor {
sb.add('.');
} else {
visit(send.receiver);
- if (send.selector.asIdentifier().token.kind === KEYWORD_TOKEN) {
+ Identifier identifier = send.selector.asIdentifier();
+ if (identifier.token.kind === KEYWORD_TOKEN) {
+ sb.add(' ');
+ } else if (identifier.source == const SourceString('negate')) {
+ // TODO(ahe): Remove special case for negate.
sb.add(' ');
}
}
« no previous file with comments | « dart/lib/compiler/implementation/ssa/builder.dart ('k') | dart/lib/compiler/implementation/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698