Index: pkg/dev_compiler/lib/src/js_ast/nodes.dart |
diff --git a/pkg/dev_compiler/lib/src/js_ast/nodes.dart b/pkg/dev_compiler/lib/src/js_ast/nodes.dart |
index 354e4f69115119211e029b41d5fc04cc0216e2b4..8317fdbeeaebb766f1c29d738902e6889b515de4 100644 |
--- a/pkg/dev_compiler/lib/src/js_ast/nodes.dart |
+++ b/pkg/dev_compiler/lib/src/js_ast/nodes.dart |
@@ -709,11 +709,16 @@ abstract class Expression extends Node { |
Statement toStatement() => new ExpressionStatement(toVoidExpression()); |
Statement toReturn() => new Return(this); |
+ |
+ // TODO(jmesserly): make this return a Yield? |
Statement toYieldStatement({bool star: false}) => |
new ExpressionStatement(new Yield(this, star: star)); |
Expression toVoidExpression() => this; |
- Expression toAssignExpression(Expression left) => new Assignment(left, this); |
+ Expression toAssignExpression(Expression left, [String op]) => |
+ new Assignment.compound(left, op, this); |
+ |
+ // TODO(jmesserly): make this work for more cases? |
Statement toVariableDeclaration(Identifier name) => |
new VariableDeclarationList( |
'let', [new VariableInitialization(name, this)]).toStatement(); |