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

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
« no previous file with comments | « lib/src/js/nodes.dart ('k') | lib/src/js/template.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/js/printer.dart
diff --git a/lib/src/js/printer.dart b/lib/src/js/printer.dart
index e07e37a7b16ccd84a4a4a3a034e6ba5305ece794..0e19d2f93a651a89704c415438625bac3fd47d41 100644
--- a/lib/src/js/printer.dart
+++ b/lib/src/js/printer.dart
@@ -781,7 +781,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);
}
« no previous file with comments | « lib/src/js/nodes.dart ('k') | lib/src/js/template.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698