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

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

Issue 10735053: Fix unparsing of variable definitions. (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 fc1d85fdd750e6d6fd46f5d776a0c661d6b44b50..663872f3e2164fa90b58bbf7b38374d47806546d 100644
--- a/lib/compiler/implementation/tree/unparser.dart
+++ b/lib/compiler/implementation/tree/unparser.dart
@@ -276,13 +276,14 @@ class Unparser implements Visitor {
}
visitVariableDefinitions(VariableDefinitions node) {
+ visit(node.modifiers);
+ if (node.modifiers.nodes.length() > 0) {
+ sb.add(' ');
+ }
if (node.type !== null) {
visit(node.type);
- } else {
- sb.add('var');
+ sb.add(' ');
}
- sb.add(' ');
- // TODO(karlklose): print modifiers.
visit(node.definitions);
if (node.endToken.value == const SourceString(';')) {
add(node.endToken.value);
« 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