| Index: sdk/lib/internal/symbol.dart
|
| diff --git a/sdk/lib/internal/symbol.dart b/sdk/lib/internal/symbol.dart
|
| index 7a0369a9a5686a9b4fb926e632cd3eced29a11cf..5078cd3623f495f58570413f883d1b4c10156865 100644
|
| --- a/sdk/lib/internal/symbol.dart
|
| +++ b/sdk/lib/internal/symbol.dart
|
| @@ -15,28 +15,24 @@ part of dart._internal;
|
| class Symbol implements core.Symbol {
|
| final String _name;
|
|
|
| + // Reserved words are not allowed as identifiers.
|
| + static const String reservedWord =
|
| + r'assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))|d(?:efault|o)|'
|
| + r'e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?:ew|ull)|'
|
| + r'ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|'
|
| + r'v(?:ar|oid)|w(?:hile|ith)';
|
| +
|
| static final RegExp validationPattern =
|
| - new RegExp(r'^(?:[a-zA-Z$][a-zA-Z$0-9_]*\.)*(?:[a-zA-Z$][a-zA-Z$0-9_]*=?|'
|
| - r'-|'
|
| - r'unary-|'
|
| - r'\[\]=|'
|
| - r'~|'
|
| + new RegExp(r'^(?:'
|
| + r'[\-+*/%&|^]|'
|
| + r'\[\]=?|'
|
| r'==|'
|
| - r'\[\]|'
|
| - r'\*|'
|
| - r'/|'
|
| - r'%|'
|
| - r'~/|'
|
| - r'\+|'
|
| - r'<<|'
|
| - r'>>|'
|
| - r'>=|'
|
| - r'>|'
|
| - r'<=|'
|
| - r'<|'
|
| - r'&|'
|
| - r'\^|'
|
| - r'\|'
|
| + r'~/?|'
|
| + r'<[<=]?|'
|
| + r'>[>=]?|'
|
| + r'unary-|'
|
| + r'(?!(?:''$reservedWord'r')\b)[a-zA-Z$][\w$]*'
|
| + r'(?:=?|(?:\.(?!(?:''$reservedWord'r')\b)[a-zA-Z$][\w$]*)*)'
|
| r')$');
|
|
|
| external const Symbol(String name);
|
|
|