Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(662)

Unified Diff: test/dart_codegen/expect/_internal/symbol.dart

Issue 1148283010: Remove dart backend (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/dart_codegen/expect/_internal/sort.dart ('k') | test/dart_codegen/expect/a/a.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
- }
-}
« no previous file with comments | « test/dart_codegen/expect/_internal/sort.dart ('k') | test/dart_codegen/expect/a/a.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698