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

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

Issue 10828076: Support signed constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 b48e08599b820aa9f57f2e1579c4a9d22afbe30b..5ebb8a7147fd5bdfad85be648acd87dbf6cd7ef2 100644
--- a/lib/compiler/implementation/tree/unparser.dart
+++ b/lib/compiler/implementation/tree/unparser.dart
@@ -143,10 +143,14 @@ class Unparser implements Visitor {
visitLiteralDouble(LiteralDouble node) {
add(node.token.value);
+ // -Lit is represented as a send.
+ if (node.token.kind == PLUS_TOKEN) add(node.token.next.value);
}
visitLiteralInt(LiteralInt node) {
add(node.token.value);
+ // -Lit is represented as a send.
+ if (node.token.kind == PLUS_TOKEN) add(node.token.next.value);
}
visitLiteralString(LiteralString node) {
« 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