OLD | NEW |
1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
3 library engine.scanner; | 3 library engine.scanner; |
4 import 'dart:collection'; | 4 import 'dart:collection'; |
5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
6 import 'java_engine.dart'; | 6 import 'java_engine.dart'; |
7 import 'source.dart'; | 7 import 'source.dart'; |
8 import 'error.dart'; | 8 import 'error.dart'; |
9 import 'instrumentation.dart'; | 9 import 'instrumentation.dart'; |
10 /** | 10 /** |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 * Initialize a newly created error code to have the given message. | 151 * Initialize a newly created error code to have the given message. |
152 * @param message the message template used to create the message to be displa
yed for this error | 152 * @param message the message template used to create the message to be displa
yed for this error |
153 */ | 153 */ |
154 ScannerErrorCode(this.name, this.ordinal, String message) { | 154 ScannerErrorCode(this.name, this.ordinal, String message) { |
155 this._message = message; | 155 this._message = message; |
156 } | 156 } |
157 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; | 157 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; |
158 String get message => _message; | 158 String get message => _message; |
159 ErrorType get type => ErrorType.SYNTACTIC_ERROR; | 159 ErrorType get type => ErrorType.SYNTACTIC_ERROR; |
160 int compareTo(ScannerErrorCode other) => ordinal - other.ordinal; | 160 int compareTo(ScannerErrorCode other) => ordinal - other.ordinal; |
| 161 int get hashCode => ordinal; |
161 String toString() => name; | 162 String toString() => name; |
162 } | 163 } |
163 /** | 164 /** |
164 * Instances of the class {@code TokenWithComment} represent a string token that
is preceded by | 165 * Instances of the class {@code TokenWithComment} represent a string token that
is preceded by |
165 * comments. | 166 * comments. |
166 * @coverage dart.engine.parser | 167 * @coverage dart.engine.parser |
167 */ | 168 */ |
168 class StringTokenWithComment extends StringToken { | 169 class StringTokenWithComment extends StringToken { |
169 | 170 |
170 /** | 171 /** |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 */ | 306 */ |
306 String get syntax => _syntax; | 307 String get syntax => _syntax; |
307 | 308 |
308 /** | 309 /** |
309 * Return {@code true} if this keyword is a pseudo-keyword. Pseudo keywords ca
n be used as | 310 * Return {@code true} if this keyword is a pseudo-keyword. Pseudo keywords ca
n be used as |
310 * identifiers. | 311 * identifiers. |
311 * @return {@code true} if this keyword is a pseudo-keyword | 312 * @return {@code true} if this keyword is a pseudo-keyword |
312 */ | 313 */ |
313 bool isPseudoKeyword() => _isPseudoKeyword2; | 314 bool isPseudoKeyword() => _isPseudoKeyword2; |
314 int compareTo(Keyword other) => ordinal - other.ordinal; | 315 int compareTo(Keyword other) => ordinal - other.ordinal; |
| 316 int get hashCode => ordinal; |
315 String toString() => name; | 317 String toString() => name; |
316 } | 318 } |
317 /** | 319 /** |
318 * The abstract class {@code AbstractScanner} implements a scanner for Dart code
. Subclasses are | 320 * The abstract class {@code AbstractScanner} implements a scanner for Dart code
. Subclasses are |
319 * required to implement the interface used to access the characters being scann
ed. | 321 * required to implement the interface used to access the characters being scann
ed. |
320 * <p> | 322 * <p> |
321 * The lexical structure of Dart is ambiguous without knowledge of the context i
n which a token is | 323 * The lexical structure of Dart is ambiguous without knowledge of the context i
n which a token is |
322 * being scanned. For example, without context we cannot determine whether sourc
e of the form "<<" | 324 * being scanned. For example, without context we cannot determine whether sourc
e of the form "<<" |
323 * should be scanned as a single left-shift operator or as two left angle bracke
ts. This scanner | 325 * should be scanned as a single left-shift operator or as two left angle bracke
ts. This scanner |
324 * does not have any context, so it always resolves such conflicts by scanning t
he longest possible | 326 * does not have any context, so it always resolves such conflicts by scanning t
he longest possible |
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1799 this._precedence = precedence2; | 1801 this._precedence = precedence2; |
1800 } | 1802 } |
1801 | 1803 |
1802 /** | 1804 /** |
1803 * Return the precedence of tokens of this class, or {@code 0} if the such tok
ens do not represent | 1805 * Return the precedence of tokens of this class, or {@code 0} if the such tok
ens do not represent |
1804 * an operator. | 1806 * an operator. |
1805 * @return the precedence of tokens of this class | 1807 * @return the precedence of tokens of this class |
1806 */ | 1808 */ |
1807 int get precedence => _precedence; | 1809 int get precedence => _precedence; |
1808 int compareTo(TokenClass other) => ordinal - other.ordinal; | 1810 int compareTo(TokenClass other) => ordinal - other.ordinal; |
| 1811 int get hashCode => ordinal; |
1809 String toString() => name; | 1812 String toString() => name; |
1810 } | 1813 } |
1811 /** | 1814 /** |
1812 * Instances of the class {@code KeywordTokenWithComment} implement a keyword to
ken that is preceded | 1815 * Instances of the class {@code KeywordTokenWithComment} implement a keyword to
ken that is preceded |
1813 * by comments. | 1816 * by comments. |
1814 * @coverage dart.engine.parser | 1817 * @coverage dart.engine.parser |
1815 */ | 1818 */ |
1816 class KeywordTokenWithComment extends KeywordToken { | 1819 class KeywordTokenWithComment extends KeywordToken { |
1817 | 1820 |
1818 /** | 1821 /** |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2026 * @return {@code true} if this type of token represents a unary prefix operat
or | 2029 * @return {@code true} if this type of token represents a unary prefix operat
or |
2027 */ | 2030 */ |
2028 bool isUnaryPrefixOperator() => identical(_tokenClass, TokenClass.UNARY_PREFIX
_OPERATOR); | 2031 bool isUnaryPrefixOperator() => identical(_tokenClass, TokenClass.UNARY_PREFIX
_OPERATOR); |
2029 | 2032 |
2030 /** | 2033 /** |
2031 * Return {@code true} if this token type represents an operator that can be d
efined by users. | 2034 * Return {@code true} if this token type represents an operator that can be d
efined by users. |
2032 * @return {@code true} if this token type represents an operator that can be
defined by users | 2035 * @return {@code true} if this token type represents an operator that can be
defined by users |
2033 */ | 2036 */ |
2034 bool isUserDefinableOperator() => identical(_lexeme, "==") || identical(_lexem
e, "~") || identical(_lexeme, "[]") || identical(_lexeme, "[]=") || identical(_l
exeme, "*") || identical(_lexeme, "/") || identical(_lexeme, "%") || identical(_
lexeme, "~/") || identical(_lexeme, "+") || identical(_lexeme, "-") || identical
(_lexeme, "<<") || identical(_lexeme, ">>") || identical(_lexeme, ">=") || ident
ical(_lexeme, ">") || identical(_lexeme, "<=") || identical(_lexeme, "<") || ide
ntical(_lexeme, "&") || identical(_lexeme, "^") || identical(_lexeme, "|"); | 2037 bool isUserDefinableOperator() => identical(_lexeme, "==") || identical(_lexem
e, "~") || identical(_lexeme, "[]") || identical(_lexeme, "[]=") || identical(_l
exeme, "*") || identical(_lexeme, "/") || identical(_lexeme, "%") || identical(_
lexeme, "~/") || identical(_lexeme, "+") || identical(_lexeme, "-") || identical
(_lexeme, "<<") || identical(_lexeme, ">>") || identical(_lexeme, ">=") || ident
ical(_lexeme, ">") || identical(_lexeme, "<=") || identical(_lexeme, "<") || ide
ntical(_lexeme, "&") || identical(_lexeme, "^") || identical(_lexeme, "|"); |
2035 int compareTo(TokenType other) => ordinal - other.ordinal; | 2038 int compareTo(TokenType other) => ordinal - other.ordinal; |
| 2039 int get hashCode => ordinal; |
2036 String toString() => name; | 2040 String toString() => name; |
2037 } | 2041 } |
2038 class TokenType_EOF extends TokenType { | 2042 class TokenType_EOF extends TokenType { |
2039 TokenType_EOF(String name, int ordinal, TokenClass arg0, String arg1) : super.
con2(name, ordinal, arg0, arg1); | 2043 TokenType_EOF(String name, int ordinal, TokenClass arg0, String arg1) : super.
con2(name, ordinal, arg0, arg1); |
2040 String toString() => "-eof-"; | 2044 String toString() => "-eof-"; |
2041 } | 2045 } |
OLD | NEW |