Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library js; | 5 library js; |
| 6 | 6 |
| 7 import 'package:js_ast/js_ast.dart'; | 7 import 'package:js_ast/js_ast.dart'; |
| 8 export 'package:js_ast/js_ast.dart'; | 8 export 'package:js_ast/js_ast.dart'; |
| 9 | 9 |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 _cachedLiteral = js.escapedString(text); | 158 _cachedLiteral = js.escapedString(text); |
| 159 } | 159 } |
| 160 return _cachedLiteral; | 160 return _cachedLiteral; |
| 161 } | 161 } |
| 162 | 162 |
| 163 @override | 163 @override |
| 164 String get value => _literal.value; | 164 String get value => _literal.value; |
| 165 } | 165 } |
| 166 | |
| 167 /// True if the given template consists of just a placeholder. Such templates | |
| 168 /// are sometimes used to manually promote the type of an expression. | |
| 169 bool isIdentityTemplate(Template template) { | |
| 170 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.
| |
| 171 } | |
| OLD | NEW |