Chromium Code Reviews| Index: pkg/compiler/lib/src/js/js.dart |
| diff --git a/pkg/compiler/lib/src/js/js.dart b/pkg/compiler/lib/src/js/js.dart |
| index 1a08cfbeb0798072ea178fd3993b134183c5c718..81ee017b58c062936ec1b316c49e52f5db9316fa 100644 |
| --- a/pkg/compiler/lib/src/js/js.dart |
| +++ b/pkg/compiler/lib/src/js/js.dart |
| @@ -162,4 +162,10 @@ class UnparsedNode extends DeferredString |
| @override |
| String get value => _literal.value; |
| -} |
| +} |
| + |
| +/// True if the given template consists of just a placeholder. Such templates |
| +/// are sometimes used to manually promote the type of an expression. |
| +bool isIdentityTemplate(Template template) { |
| + return template.source == '#'; |
|
sra1
2016/01/11 19:31:20
It would be better to check the ast for a placehol
asgerf
2016/01/11 20:11:44
Replaced with an is-check.
|
| +} |