Index: test/dart_codegen/expect/_internal/symbol.dart |
diff --git a/test/dart_codegen/expect/_internal/symbol.dart b/test/dart_codegen/expect/_internal/symbol.dart |
deleted file mode 100644 |
index 4883e8c5eda059a464bc6121f21e01a33fc7fb76..0000000000000000000000000000000000000000 |
--- a/test/dart_codegen/expect/_internal/symbol.dart |
+++ /dev/null |
@@ -1,29 +0,0 @@ |
-part of dart._internal; |
- class Symbol implements core.Symbol {final String _name; |
- static const String reservedWordRE = 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 const String publicIdentifierRE = r'(?!' '$reservedWordRE' r'\b(?!\$))[a-zA-Z$][\w$]*'; |
- static const String identifierRE = r'(?!' '$reservedWordRE' r'\b(?!\$))[a-zA-Z$_][\w$]*'; |
- static const String operatorRE = r'(?:[\-+*/%&|^]|\[\]=?|==|~/?|<[<=]?|>[>=]?|unary-)'; |
- static final RegExp publicSymbolPattern = new RegExp('^(?:$operatorRE\$|$publicIdentifierRE(?:=?\$|[.](?!\$)))+?\$'); |
- static final RegExp symbolPattern = new RegExp('^(?:$operatorRE\$|$identifierRE(?:=?\$|[.](?!\$)))+?\$'); |
- external const Symbol(String name); |
- const Symbol.unvalidated(this._name); |
- Symbol.validated(String name) : this._name = validatePublicSymbol(name); |
- bool operator ==(Object other) => other is Symbol && _name == other._name; |
- int get hashCode { |
- const arbitraryPrime = 664597; |
- return 0x1fffffff & (arbitraryPrime * _name.hashCode); |
- } |
- toString() => 'Symbol("$_name")'; |
- static String getName(Symbol symbol) => symbol._name; |
- static String validatePublicSymbol(String name) { |
- if (name.isEmpty || publicSymbolPattern.hasMatch(name)) return name; |
- if (name.startsWith('_')) { |
- throw new ArgumentError('"$name" is a private identifier'); |
- } |
- throw new ArgumentError('"$name" is not a valid (qualified) symbol name'); |
- } |
- static bool isValidSymbol(String name) { |
- return (name.isEmpty || symbolPattern.hasMatch(name)); |
- } |
-} |