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

Unified Diff: lib/src/js/printer.dart

Issue 1243503007: fixes #221, initial sync*, async, async* implementation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
Index: lib/src/js/printer.dart
diff --git a/lib/src/js/printer.dart b/lib/src/js/printer.dart
index c545073f2e25bbdc7321f2312f70e550795e9f8b..ffd8e16c31820e5d3d57b6551a29000c2e00e816 100644
--- a/lib/src/js/printer.dart
+++ b/lib/src/js/printer.dart
@@ -772,7 +772,9 @@ class Printer implements NodeVisitor {
visitSpread(Spread unary) => visitPrefix(unary);
visitYield(Yield yield) {
- out(yield.star ? "yield* " : "yield ");
+ out(yield.star ? "yield*" : "yield");
+ if (yield.value == null) return;
+ out(" ");
visitNestedExpression(yield.value, yield.precedenceLevel,
newInForInit: inForInit, newAtStatementBegin: false);
}

Powered by Google App Engine
This is Rietveld 408576698