Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/js/nodes.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/js/nodes.dart b/sdk/lib/_internal/compiler/implementation/js/nodes.dart |
| index 93d1f5ecb735a5b3e47353ce0c14eb03b132bb11..17c7867a4a812779481facb209c02210f8b13d0f 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/js/nodes.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/js/nodes.dart |
| @@ -700,7 +700,11 @@ abstract class VariableReference extends Expression { |
| // We treat operators as if they were special functions. They can thus be |
| // referenced like other variables. |
| - VariableReference(this.name); |
| + VariableReference(this.name) { |
| + assert(_identiferOrOperatorRE.hasMatch(name)); |
| + } |
| + static RegExp _identiferOrOperatorRE = |
|
floitsch
2014/04/28 14:17:51
identifierOrOperatorRE (missing "i")
sra1
2014/04/28 23:00:41
Done.
|
| + new RegExp(r'^([A-Za-z_$][A-Za-z_$0-9]*|[-<=>+\*\/%^!|&~,]*)$'); |
|
floitsch
2014/04/28 14:17:51
you don't need to escape '*' inside a character gr
sra1
2014/04/28 23:00:41
'Done'. After the operators cl, the test is just
|
| accept(NodeVisitor visitor); |
| int get precedenceLevel => PRIMARY; |