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 3ac6a9b6f5c3e7067885151a2ed8ee42604a0c2a..1d9c690249c54bf862c47be260d433e4db8f8fed 100644 |
--- a/pkg/compiler/lib/src/tree/unparser.dart |
+++ b/pkg/compiler/lib/src/tree/unparser.dart |
@@ -253,8 +253,18 @@ class Unparser extends Indentation implements Visitor { |
unparseNodeListFrom(node.initializers, node.initializers.nodes, |
spaces: true); |
} |
- visit(node.asyncModifier); |
- if (node.body != null && node.body is! EmptyStatement) space(); |
+ if (node.asyncModifier != null) { |
+ if (node.getOrSet != null) { |
+ write(' '); |
+ } else { |
+ // Space is optional if this is not a getter. |
+ space(); |
+ } |
+ visit(node.asyncModifier); |
+ } |
+ if (node.body != null && node.body is! EmptyStatement) { |
+ space(); |
+ } |
visit(node.body); |
} |
@@ -394,11 +404,13 @@ class Unparser extends Indentation implements Visitor { |
} |
visitYield(Yield node) { |
- write(node.yieldToken); |
- write(node.starToken); |
+ write(node.yieldToken.value); |
+ if (node.starToken != null) { |
+ write(node.starToken.value); |
+ } |
space(); |
visit(node.expression); |
- write(node.endToken); |
+ write(node.endToken.value); |
} |