| Index: pkg/js_ast/lib/src/template.dart
|
| diff --git a/pkg/js_ast/lib/src/template.dart b/pkg/js_ast/lib/src/template.dart
|
| index eb4089ad807090f3b6270d5192658c0e6933e8ad..e0f0d5bb53972c846165247c3343deaaaeb6b3bd 100644
|
| --- a/pkg/js_ast/lib/src/template.dart
|
| +++ b/pkg/js_ast/lib/src/template.dart
|
| @@ -59,20 +59,29 @@ class Template {
|
| _compile();
|
| }
|
|
|
| - Template.withExpressionResult(this.ast)
|
| + Template.withExpressionResult(this.ast, {hasPlaceholders : false})
|
| : source = null, isExpression = true, forceCopy = false {
|
| assert(ast is Expression);
|
| - assert(_checkNoPlaceholders());
|
| - positionalArgumentCount = 0;
|
| - instantiator = (arguments) => ast;
|
| + if (hasPlaceholders) {
|
| + _compile();
|
| + } else {
|
| + assert(_checkNoPlaceholders());
|
| + positionalArgumentCount = 0;
|
| + instantiator = (arguments) => ast;
|
| + }
|
| }
|
|
|
| - Template.withStatementResult(this.ast)
|
| + Template.withStatementResult(this.ast, {hasPlaceholders : false})
|
| : source = null, isExpression = false, forceCopy = false {
|
| assert(ast is Statement);
|
| - assert(_checkNoPlaceholders());
|
| - positionalArgumentCount = 0;
|
| - instantiator = (arguments) => ast;
|
| +
|
| + if (hasPlaceholders) {
|
| + _compile();
|
| + } else {
|
| + assert(_checkNoPlaceholders());
|
| + positionalArgumentCount = 0;
|
| + instantiator = (arguments) => ast;
|
| + }
|
| }
|
|
|
| bool _checkNoPlaceholders() {
|
|
|