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}) |
sra1
2015/05/19 20:56:54
I think we should keep 'withExpressionResult' for
herhut
2015/05/20 08:09:16
Done.
|
: 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}) |
sra1
2015/05/19 20:56:55
Is this used?
herhut
2015/05/20 08:09:16
Removed.
|
: 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() { |