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

Side by Side Diff: pkg/analyzer-experimental/lib/src/generated/scanner.dart

Issue 12671003: Push new analyzer-experimental with Resolver and ResolverTest. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 3
4 library engine.scanner; 4 library engine.scanner;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'java_core.dart'; 7 import 'java_core.dart';
8 import 'source.dart'; 8 import 'source.dart';
9 import 'error.dart'; 9 import 'error.dart';
10 import 'instrumentation.dart'; 10 import 'instrumentation.dart';
11 11
12 /** 12 /**
13 * Instances of the abstract class {@code KeywordState} represent a state in a s tate machine used to 13 * Instances of the abstract class {@code KeywordState} represent a state in a s tate machine used to
14 * scan keywords. 14 * scan keywords.
15 * @coverage dart.engine.parser
15 */ 16 */
16 class KeywordState { 17 class KeywordState {
17 /** 18 /**
18 * An empty transition table used by leaf states. 19 * An empty transition table used by leaf states.
19 */ 20 */
20 static List<KeywordState> _EMPTY_TABLE = new List<KeywordState>(26); 21 static List<KeywordState> _EMPTY_TABLE = new List<KeywordState>(26);
21 /** 22 /**
22 * The initial state in the state machine. 23 * The initial state in the state machine.
23 */ 24 */
24 static KeywordState KEYWORD_STATE = createKeywordStateTable(); 25 static KeywordState KEYWORD_STATE = createKeywordStateTable();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 /** 111 /**
111 * Return the state that follows this state on a transition of the given chara cter, or{@code null} if there is no valid state reachable from this state with s uch a transition. 112 * Return the state that follows this state on a transition of the given chara cter, or{@code null} if there is no valid state reachable from this state with s uch a transition.
112 * @param c the character used to transition from this state to another state 113 * @param c the character used to transition from this state to another state
113 * @return the state that follows this state on a transition of the given char acter 114 * @return the state that follows this state on a transition of the given char acter
114 */ 115 */
115 KeywordState next(int c) => _table[c - 0x61]; 116 KeywordState next(int c) => _table[c - 0x61];
116 } 117 }
117 /** 118 /**
118 * The enumeration {@code ScannerErrorCode} defines the error codes used for err ors detected by the 119 * The enumeration {@code ScannerErrorCode} defines the error codes used for err ors detected by the
119 * scanner. 120 * scanner.
121 * @coverage dart.engine.parser
120 */ 122 */
121 class ScannerErrorCode implements ErrorCode { 123 class ScannerErrorCode implements ErrorCode {
122 static final ScannerErrorCode ILLEGAL_CHARACTER = new ScannerErrorCode('ILLEGA L_CHARACTER', 0, "Illegal character %x"); 124 static final ScannerErrorCode ILLEGAL_CHARACTER = new ScannerErrorCode('ILLEGA L_CHARACTER', 0, "Illegal character %x");
123 static final ScannerErrorCode MISSING_DIGIT = new ScannerErrorCode('MISSING_DI GIT', 1, "Decimal digit expected"); 125 static final ScannerErrorCode MISSING_DIGIT = new ScannerErrorCode('MISSING_DI GIT', 1, "Decimal digit expected");
124 static final ScannerErrorCode MISSING_HEX_DIGIT = new ScannerErrorCode('MISSIN G_HEX_DIGIT', 2, "Hexidecimal digit expected"); 126 static final ScannerErrorCode MISSING_HEX_DIGIT = new ScannerErrorCode('MISSIN G_HEX_DIGIT', 2, "Hexidecimal digit expected");
125 static final ScannerErrorCode MISSING_QUOTE = new ScannerErrorCode('MISSING_QU OTE', 3, "Expected quote (' or \")"); 127 static final ScannerErrorCode MISSING_QUOTE = new ScannerErrorCode('MISSING_QU OTE', 3, "Expected quote (' or \")");
126 static final ScannerErrorCode UNTERMINATED_MULTI_LINE_COMMENT = new ScannerErr orCode('UNTERMINATED_MULTI_LINE_COMMENT', 4, "Unterminated multi-line comment"); 128 static final ScannerErrorCode UNTERMINATED_MULTI_LINE_COMMENT = new ScannerErr orCode('UNTERMINATED_MULTI_LINE_COMMENT', 4, "Unterminated multi-line comment");
127 static final ScannerErrorCode UNTERMINATED_STRING_LITERAL = new ScannerErrorCo de('UNTERMINATED_STRING_LITERAL', 5, "Unterminated string literal"); 129 static final ScannerErrorCode UNTERMINATED_STRING_LITERAL = new ScannerErrorCo de('UNTERMINATED_STRING_LITERAL', 5, "Unterminated string literal");
128 static final List<ScannerErrorCode> values = [ILLEGAL_CHARACTER, MISSING_DIGIT , MISSING_HEX_DIGIT, MISSING_QUOTE, UNTERMINATED_MULTI_LINE_COMMENT, UNTERMINATE D_STRING_LITERAL]; 130 static final List<ScannerErrorCode> values = [ILLEGAL_CHARACTER, MISSING_DIGIT , MISSING_HEX_DIGIT, MISSING_QUOTE, UNTERMINATED_MULTI_LINE_COMMENT, UNTERMINATE D_STRING_LITERAL];
129 final String __name; 131 final String __name;
130 final int __ordinal; 132 final int __ordinal;
133 int get ordinal => __ordinal;
131 /** 134 /**
132 * The message template used to create the message to be displayed for this er ror. 135 * The message template used to create the message to be displayed for this er ror.
133 */ 136 */
134 String _message; 137 String _message;
135 /** 138 /**
136 * Initialize a newly created error code to have the given message. 139 * Initialize a newly created error code to have the given message.
137 * @param message the message template used to create the message to be displa yed for this error 140 * @param message the message template used to create the message to be displa yed for this error
138 */ 141 */
139 ScannerErrorCode(this.__name, this.__ordinal, String message) { 142 ScannerErrorCode(this.__name, this.__ordinal, String message) {
140 this._message = message; 143 this._message = message;
141 } 144 }
142 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; 145 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
143 String get message => _message; 146 String get message => _message;
144 ErrorType get type => ErrorType.SYNTACTIC_ERROR; 147 ErrorType get type => ErrorType.SYNTACTIC_ERROR;
145 bool needsRecompilation() => true; 148 bool needsRecompilation() => true;
146 String toString() => __name; 149 String toString() => __name;
147 } 150 }
148 /** 151 /**
149 * Instances of the class {@code TokenWithComment} represent a string token that is preceded by 152 * Instances of the class {@code TokenWithComment} represent a string token that is preceded by
150 * comments. 153 * comments.
154 * @coverage dart.engine.parser
151 */ 155 */
152 class StringTokenWithComment extends StringToken { 156 class StringTokenWithComment extends StringToken {
153 /** 157 /**
154 * The first comment in the list of comments that precede this token. 158 * The first comment in the list of comments that precede this token.
155 */ 159 */
156 Token _precedingComment; 160 Token _precedingComment;
157 /** 161 /**
158 * Initialize a newly created token to have the given type and offset and to b e preceded by the 162 * Initialize a newly created token to have the given type and offset and to b e preceded by the
159 * comments reachable from the given comment. 163 * comments reachable from the given comment.
160 * @param type the type of the token 164 * @param type the type of the token
161 * @param offset the offset from the beginning of the file to the first charac ter in the token 165 * @param offset the offset from the beginning of the file to the first charac ter in the token
162 * @param precedingComment the first comment in the list of comments that prec ede this token 166 * @param precedingComment the first comment in the list of comments that prec ede this token
163 */ 167 */
164 StringTokenWithComment(TokenType type, String value, int offset, Token precedi ngComment) : super(type, value, offset) { 168 StringTokenWithComment(TokenType type, String value, int offset, Token precedi ngComment) : super(type, value, offset) {
165 this._precedingComment = precedingComment; 169 this._precedingComment = precedingComment;
166 } 170 }
167 Token get precedingComments => _precedingComment; 171 Token get precedingComments => _precedingComment;
168 } 172 }
169 /** 173 /**
170 * The enumeration {@code Keyword} defines the keywords in the Dart programming language. 174 * The enumeration {@code Keyword} defines the keywords in the Dart programming language.
175 * @coverage dart.engine.parser
171 */ 176 */
172 class Keyword { 177 class Keyword {
173 static final Keyword ASSERT = new Keyword.con1('ASSERT', 0, "assert"); 178 static final Keyword ASSERT = new Keyword.con1('ASSERT', 0, "assert");
174 static final Keyword BREAK = new Keyword.con1('BREAK', 1, "break"); 179 static final Keyword BREAK = new Keyword.con1('BREAK', 1, "break");
175 static final Keyword CASE = new Keyword.con1('CASE', 2, "case"); 180 static final Keyword CASE = new Keyword.con1('CASE', 2, "case");
176 static final Keyword CATCH = new Keyword.con1('CATCH', 3, "catch"); 181 static final Keyword CATCH = new Keyword.con1('CATCH', 3, "catch");
177 static final Keyword CLASS = new Keyword.con1('CLASS', 4, "class"); 182 static final Keyword CLASS = new Keyword.con1('CLASS', 4, "class");
178 static final Keyword CONST = new Keyword.con1('CONST', 5, "const"); 183 static final Keyword CONST = new Keyword.con1('CONST', 5, "const");
179 static final Keyword CONTINUE = new Keyword.con1('CONTINUE', 6, "continue"); 184 static final Keyword CONTINUE = new Keyword.con1('CONTINUE', 6, "continue");
180 static final Keyword DEFAULT = new Keyword.con1('DEFAULT', 7, "default"); 185 static final Keyword DEFAULT = new Keyword.con1('DEFAULT', 7, "default");
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 static final Keyword IMPORT = new Keyword.con2('IMPORT', 39, "import", true); 217 static final Keyword IMPORT = new Keyword.con2('IMPORT', 39, "import", true);
213 static final Keyword LIBRARY = new Keyword.con2('LIBRARY', 40, "library", true ); 218 static final Keyword LIBRARY = new Keyword.con2('LIBRARY', 40, "library", true );
214 static final Keyword OPERATOR = new Keyword.con2('OPERATOR', 41, "operator", t rue); 219 static final Keyword OPERATOR = new Keyword.con2('OPERATOR', 41, "operator", t rue);
215 static final Keyword PART = new Keyword.con2('PART', 42, "part", true); 220 static final Keyword PART = new Keyword.con2('PART', 42, "part", true);
216 static final Keyword SET = new Keyword.con2('SET', 43, "set", true); 221 static final Keyword SET = new Keyword.con2('SET', 43, "set", true);
217 static final Keyword STATIC = new Keyword.con2('STATIC', 44, "static", true); 222 static final Keyword STATIC = new Keyword.con2('STATIC', 44, "static", true);
218 static final Keyword TYPEDEF = new Keyword.con2('TYPEDEF', 45, "typedef", true ); 223 static final Keyword TYPEDEF = new Keyword.con2('TYPEDEF', 45, "typedef", true );
219 static final List<Keyword> values = [ASSERT, BREAK, CASE, CATCH, CLASS, CONST, CONTINUE, DEFAULT, DO, ELSE, EXTENDS, FALSE, FINAL, FINALLY, FOR, IF, IN, IS, N EW, NULL, RETURN, SUPER, SWITCH, THIS, THROW, TRUE, TRY, VAR, VOID, WHILE, WITH, ABSTRACT, AS, DYNAMIC, EXPORT, EXTERNAL, FACTORY, GET, IMPLEMENTS, IMPORT, LIBR ARY, OPERATOR, PART, SET, STATIC, TYPEDEF]; 224 static final List<Keyword> values = [ASSERT, BREAK, CASE, CATCH, CLASS, CONST, CONTINUE, DEFAULT, DO, ELSE, EXTENDS, FALSE, FINAL, FINALLY, FOR, IF, IN, IS, N EW, NULL, RETURN, SUPER, SWITCH, THIS, THROW, TRUE, TRY, VAR, VOID, WHILE, WITH, ABSTRACT, AS, DYNAMIC, EXPORT, EXTERNAL, FACTORY, GET, IMPLEMENTS, IMPORT, LIBR ARY, OPERATOR, PART, SET, STATIC, TYPEDEF];
220 String __name; 225 String __name;
221 int __ordinal = 0; 226 int __ordinal = 0;
227 int get ordinal => __ordinal;
222 /** 228 /**
223 * The lexeme for the keyword. 229 * The lexeme for the keyword.
224 */ 230 */
225 String _syntax; 231 String _syntax;
226 /** 232 /**
227 * A flag indicating whether the keyword is a pseudo-keyword. Pseudo keywords can be used as 233 * A flag indicating whether the keyword is a pseudo-keyword. Pseudo keywords can be used as
228 * identifiers. 234 * identifiers.
229 */ 235 */
230 bool _isPseudoKeyword2 = false; 236 bool _isPseudoKeyword2 = false;
231 /** 237 /**
(...skipping 10 matching lines...) Expand all
242 result[keyword._syntax] = keyword; 248 result[keyword._syntax] = keyword;
243 } 249 }
244 return result; 250 return result;
245 } 251 }
246 /** 252 /**
247 * Initialize a newly created keyword to have the given syntax. The keyword is not a 253 * Initialize a newly created keyword to have the given syntax. The keyword is not a
248 * pseudo-keyword. 254 * pseudo-keyword.
249 * @param syntax the lexeme for the keyword 255 * @param syntax the lexeme for the keyword
250 */ 256 */
251 Keyword.con1(String ___name, int ___ordinal, String syntax) { 257 Keyword.con1(String ___name, int ___ordinal, String syntax) {
252 _jtd_constructor_259_impl(___name, ___ordinal, syntax); 258 _jtd_constructor_265_impl(___name, ___ordinal, syntax);
253 } 259 }
254 _jtd_constructor_259_impl(String ___name, int ___ordinal, String syntax) { 260 _jtd_constructor_265_impl(String ___name, int ___ordinal, String syntax) {
255 _jtd_constructor_260_impl(___name, ___ordinal, syntax, false); 261 _jtd_constructor_266_impl(___name, ___ordinal, syntax, false);
256 } 262 }
257 /** 263 /**
258 * Initialize a newly created keyword to have the given syntax. The keyword is a pseudo-keyword if 264 * Initialize a newly created keyword to have the given syntax. The keyword is a pseudo-keyword if
259 * the given flag is {@code true}. 265 * the given flag is {@code true}.
260 * @param syntax the lexeme for the keyword 266 * @param syntax the lexeme for the keyword
261 * @param isPseudoKeyword {@code true} if this keyword is a pseudo-keyword 267 * @param isPseudoKeyword {@code true} if this keyword is a pseudo-keyword
262 */ 268 */
263 Keyword.con2(String ___name, int ___ordinal, String syntax2, bool isPseudoKeyw ord) { 269 Keyword.con2(String ___name, int ___ordinal, String syntax2, bool isPseudoKeyw ord) {
264 _jtd_constructor_260_impl(___name, ___ordinal, syntax2, isPseudoKeyword); 270 _jtd_constructor_266_impl(___name, ___ordinal, syntax2, isPseudoKeyword);
265 } 271 }
266 _jtd_constructor_260_impl(String ___name, int ___ordinal, String syntax2, bool isPseudoKeyword) { 272 _jtd_constructor_266_impl(String ___name, int ___ordinal, String syntax2, bool isPseudoKeyword) {
267 __name = ___name; 273 __name = ___name;
268 __ordinal = ___ordinal; 274 __ordinal = ___ordinal;
269 this._syntax = syntax2; 275 this._syntax = syntax2;
270 this._isPseudoKeyword2 = isPseudoKeyword; 276 this._isPseudoKeyword2 = isPseudoKeyword;
271 } 277 }
272 /** 278 /**
273 * Return the lexeme for the keyword. 279 * Return the lexeme for the keyword.
274 * @return the lexeme for the keyword 280 * @return the lexeme for the keyword
275 */ 281 */
276 String get syntax => _syntax; 282 String get syntax => _syntax;
277 /** 283 /**
278 * Return {@code true} if this keyword is a pseudo-keyword. Pseudo keywords ca n be used as 284 * Return {@code true} if this keyword is a pseudo-keyword. Pseudo keywords ca n be used as
279 * identifiers. 285 * identifiers.
280 * @return {@code true} if this keyword is a pseudo-keyword 286 * @return {@code true} if this keyword is a pseudo-keyword
281 */ 287 */
282 bool isPseudoKeyword() => _isPseudoKeyword2; 288 bool isPseudoKeyword() => _isPseudoKeyword2;
283 String toString() => __name; 289 String toString() => __name;
284 } 290 }
285 /** 291 /**
286 * The abstract class {@code AbstractScanner} implements a scanner for Dart code . Subclasses are 292 * The abstract class {@code AbstractScanner} implements a scanner for Dart code . Subclasses are
287 * required to implement the interface used to access the characters being scann ed. 293 * required to implement the interface used to access the characters being scann ed.
288 * <p> 294 * <p>
289 * The lexical structure of Dart is ambiguous without knowledge of the context i n which a token is 295 * The lexical structure of Dart is ambiguous without knowledge of the context i n which a token is
290 * being scanned. For example, without context we cannot determine whether sourc e of the form "<<" 296 * being scanned. For example, without context we cannot determine whether sourc e of the form "<<"
291 * should be scanned as a single left-shift operator or as two left angle bracke ts. This scanner 297 * should be scanned as a single left-shift operator or as two left angle bracke ts. This scanner
292 * does not have any context, so it always resolves such conflicts by scanning t he longest possible 298 * does not have any context, so it always resolves such conflicts by scanning t he longest possible
293 * token. 299 * token.
300 * @coverage dart.engine.parser
294 */ 301 */
295 abstract class AbstractScanner { 302 abstract class AbstractScanner {
296 /** 303 /**
297 * The source being scanned. 304 * The source being scanned.
298 */ 305 */
299 Source _source; 306 Source _source;
300 /** 307 /**
301 * The error listener that will be informed of any errors that are found durin g the scan. 308 * The error listener that will be informed of any errors that are found durin g the scan.
302 */ 309 */
303 AnalysisErrorListener _errorListener; 310 AnalysisErrorListener _errorListener;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 _groupingStack.add(token); 427 _groupingStack.add(token);
421 } 428 }
422 void appendCommentToken(TokenType type, String value) { 429 void appendCommentToken(TokenType type, String value) {
423 if (_firstComment == null) { 430 if (_firstComment == null) {
424 _firstComment = new StringToken(type, value, _tokenStart); 431 _firstComment = new StringToken(type, value, _tokenStart);
425 _lastComment = _firstComment; 432 _lastComment = _firstComment;
426 } else { 433 } else {
427 _lastComment = _lastComment.setNext(new StringToken(type, value, _tokenSta rt)); 434 _lastComment = _lastComment.setNext(new StringToken(type, value, _tokenSta rt));
428 } 435 }
429 } 436 }
430 void appendEndToken(TokenType type31, TokenType beginType) { 437 void appendEndToken(TokenType type32, TokenType beginType) {
431 Token token; 438 Token token;
432 if (_firstComment == null) { 439 if (_firstComment == null) {
433 token = new Token(type31, _tokenStart); 440 token = new Token(type32, _tokenStart);
434 } else { 441 } else {
435 token = new TokenWithComment(type31, _tokenStart, _firstComment); 442 token = new TokenWithComment(type32, _tokenStart, _firstComment);
436 _firstComment = null; 443 _firstComment = null;
437 _lastComment = null; 444 _lastComment = null;
438 } 445 }
439 _tail = _tail.setNext(token); 446 _tail = _tail.setNext(token);
440 int last = _groupingStack.length - 1; 447 int last = _groupingStack.length - 1;
441 if (last >= 0) { 448 if (last >= 0) {
442 BeginToken begin = _groupingStack[last]; 449 BeginToken begin = _groupingStack[last];
443 if (identical(begin.type, beginType)) { 450 if (identical(begin.type, beginType)) {
444 begin.endToken = token; 451 begin.endToken = token;
445 _groupingStack.removeAt(last); 452 _groupingStack.removeAt(last);
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 return select(0x3D, TokenType.TILDE_SLASH_EQ, TokenType.TILDE_SLASH); 1196 return select(0x3D, TokenType.TILDE_SLASH_EQ, TokenType.TILDE_SLASH);
1190 } else { 1197 } else {
1191 appendToken(TokenType.TILDE); 1198 appendToken(TokenType.TILDE);
1192 return next; 1199 return next;
1193 } 1200 }
1194 } 1201 }
1195 } 1202 }
1196 /** 1203 /**
1197 * Instances of the class {@code StringToken} represent a token whose value is i ndependent of it's 1204 * Instances of the class {@code StringToken} represent a token whose value is i ndependent of it's
1198 * type. 1205 * type.
1206 * @coverage dart.engine.parser
1199 */ 1207 */
1200 class StringToken extends Token { 1208 class StringToken extends Token {
1201 /** 1209 /**
1202 * The lexeme represented by this token. 1210 * The lexeme represented by this token.
1203 */ 1211 */
1204 String _value2; 1212 String _value2;
1205 /** 1213 /**
1206 * Initialize a newly created token to represent a token of the given type wit h the given value. 1214 * Initialize a newly created token to represent a token of the given type wit h the given value.
1207 * @param type the type of the token 1215 * @param type the type of the token
1208 * @param value the lexeme represented by this token 1216 * @param value the lexeme represented by this token
1209 * @param offset the offset from the beginning of the file to the first charac ter in the token 1217 * @param offset the offset from the beginning of the file to the first charac ter in the token
1210 */ 1218 */
1211 StringToken(TokenType type, String value, int offset) : super(type, offset) { 1219 StringToken(TokenType type, String value, int offset) : super(type, offset) {
1212 this._value2 = value; 1220 this._value2 = value;
1213 } 1221 }
1214 String get lexeme => _value2; 1222 String get lexeme => _value2;
1215 String value() => _value2; 1223 String value() => _value2;
1216 } 1224 }
1217 /** 1225 /**
1218 * Instances of the class {@code CharBufferScanner} implement a scanner that rea ds from a character 1226 * Instances of the class {@code CharBufferScanner} implement a scanner that rea ds from a character
1219 * buffer. The scanning logic is in the superclass. 1227 * buffer. The scanning logic is in the superclass.
1228 * @coverage dart.engine.parser
1220 */ 1229 */
1221 class CharBufferScanner extends AbstractScanner { 1230 class CharBufferScanner extends AbstractScanner {
1222 /** 1231 /**
1223 * The buffer from which characters will be read. 1232 * The buffer from which characters will be read.
1224 */ 1233 */
1225 CharBuffer _buffer; 1234 CharBuffer _buffer;
1226 /** 1235 /**
1227 * The number of characters in the buffer. 1236 * The number of characters in the buffer.
1228 */ 1237 */
1229 int _bufferLength = 0; 1238 int _bufferLength = 0;
(...skipping 23 matching lines...) Expand all
1253 int peek() { 1262 int peek() {
1254 if (_charOffset + 1 >= _buffer.length()) { 1263 if (_charOffset + 1 >= _buffer.length()) {
1255 return -1; 1264 return -1;
1256 } 1265 }
1257 return _buffer.charAt(_charOffset + 1); 1266 return _buffer.charAt(_charOffset + 1);
1258 } 1267 }
1259 } 1268 }
1260 /** 1269 /**
1261 * Instances of the class {@code TokenWithComment} represent a normal token that is preceded by 1270 * Instances of the class {@code TokenWithComment} represent a normal token that is preceded by
1262 * comments. 1271 * comments.
1272 * @coverage dart.engine.parser
1263 */ 1273 */
1264 class TokenWithComment extends Token { 1274 class TokenWithComment extends Token {
1265 /** 1275 /**
1266 * The first comment in the list of comments that precede this token. 1276 * The first comment in the list of comments that precede this token.
1267 */ 1277 */
1268 Token _precedingComment; 1278 Token _precedingComment;
1269 /** 1279 /**
1270 * Initialize a newly created token to have the given type and offset and to b e preceded by the 1280 * Initialize a newly created token to have the given type and offset and to b e preceded by the
1271 * comments reachable from the given comment. 1281 * comments reachable from the given comment.
1272 * @param type the type of the token 1282 * @param type the type of the token
1273 * @param offset the offset from the beginning of the file to the first charac ter in the token 1283 * @param offset the offset from the beginning of the file to the first charac ter in the token
1274 * @param precedingComment the first comment in the list of comments that prec ede this token 1284 * @param precedingComment the first comment in the list of comments that prec ede this token
1275 */ 1285 */
1276 TokenWithComment(TokenType type, int offset, Token precedingComment) : super(t ype, offset) { 1286 TokenWithComment(TokenType type, int offset, Token precedingComment) : super(t ype, offset) {
1277 this._precedingComment = precedingComment; 1287 this._precedingComment = precedingComment;
1278 } 1288 }
1279 Token get precedingComments => _precedingComment; 1289 Token get precedingComments => _precedingComment;
1280 } 1290 }
1281 /** 1291 /**
1282 * Instances of the class {@code Token} represent a token that was scanned from the input. Each 1292 * Instances of the class {@code Token} represent a token that was scanned from the input. Each
1283 * token knows which token follows it, acting as the head of a linked list of to kens. 1293 * token knows which token follows it, acting as the head of a linked list of to kens.
1294 * @coverage dart.engine.parser
1284 */ 1295 */
1285 class Token { 1296 class Token {
1286 /** 1297 /**
1287 * The type of the token. 1298 * The type of the token.
1288 */ 1299 */
1289 TokenType _type; 1300 TokenType _type;
1290 /** 1301 /**
1291 * The offset from the beginning of the file to the first character in the tok en. 1302 * The offset from the beginning of the file to the first character in the tok en.
1292 */ 1303 */
1293 int _offset = 0; 1304 int _offset = 0;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 * Set the previous token in the token stream to the given token. 1420 * Set the previous token in the token stream to the given token.
1410 * @param previous the previous token in the token stream 1421 * @param previous the previous token in the token stream
1411 */ 1422 */
1412 void set previous(Token previous3) { 1423 void set previous(Token previous3) {
1413 this._previous = previous3; 1424 this._previous = previous3;
1414 } 1425 }
1415 } 1426 }
1416 /** 1427 /**
1417 * Instances of the class {@code StringScanner} implement a scanner that reads f rom a string. The 1428 * Instances of the class {@code StringScanner} implement a scanner that reads f rom a string. The
1418 * scanning logic is in the superclass. 1429 * scanning logic is in the superclass.
1430 * @coverage dart.engine.parser
1419 */ 1431 */
1420 class StringScanner extends AbstractScanner { 1432 class StringScanner extends AbstractScanner {
1421 /** 1433 /**
1422 * The offset from the beginning of the file to the beginning of the source be ing scanned. 1434 * The offset from the beginning of the file to the beginning of the source be ing scanned.
1423 */ 1435 */
1424 int _offsetDelta = 0; 1436 int _offsetDelta = 0;
1425 /** 1437 /**
1426 * The string from which characters will be read. 1438 * The string from which characters will be read.
1427 */ 1439 */
1428 String _string; 1440 String _string;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 int peek() { 1493 int peek() {
1482 if (_charOffset + 1 >= _string.length) { 1494 if (_charOffset + 1 >= _string.length) {
1483 return -1; 1495 return -1;
1484 } 1496 }
1485 return _string.codeUnitAt(_charOffset + 1); 1497 return _string.codeUnitAt(_charOffset + 1);
1486 } 1498 }
1487 } 1499 }
1488 /** 1500 /**
1489 * Instances of the class {@code BeginTokenWithComment} represent a begin token that is preceded by 1501 * Instances of the class {@code BeginTokenWithComment} represent a begin token that is preceded by
1490 * comments. 1502 * comments.
1503 * @coverage dart.engine.parser
1491 */ 1504 */
1492 class BeginTokenWithComment extends BeginToken { 1505 class BeginTokenWithComment extends BeginToken {
1493 /** 1506 /**
1494 * The first comment in the list of comments that precede this token. 1507 * The first comment in the list of comments that precede this token.
1495 */ 1508 */
1496 Token _precedingComment; 1509 Token _precedingComment;
1497 /** 1510 /**
1498 * Initialize a newly created token to have the given type and offset and to b e preceded by the 1511 * Initialize a newly created token to have the given type and offset and to b e preceded by the
1499 * comments reachable from the given comment. 1512 * comments reachable from the given comment.
1500 * @param type the type of the token 1513 * @param type the type of the token
1501 * @param offset the offset from the beginning of the file to the first charac ter in the token 1514 * @param offset the offset from the beginning of the file to the first charac ter in the token
1502 * @param precedingComment the first comment in the list of comments that prec ede this token 1515 * @param precedingComment the first comment in the list of comments that prec ede this token
1503 */ 1516 */
1504 BeginTokenWithComment(TokenType type, int offset, Token precedingComment) : su per(type, offset) { 1517 BeginTokenWithComment(TokenType type, int offset, Token precedingComment) : su per(type, offset) {
1505 this._precedingComment = precedingComment; 1518 this._precedingComment = precedingComment;
1506 } 1519 }
1507 Token get precedingComments => _precedingComment; 1520 Token get precedingComments => _precedingComment;
1508 } 1521 }
1509 /** 1522 /**
1510 * Instances of the class {@code KeywordToken} represent a keyword in the langua ge. 1523 * Instances of the class {@code KeywordToken} represent a keyword in the langua ge.
1524 * @coverage dart.engine.parser
1511 */ 1525 */
1512 class KeywordToken extends Token { 1526 class KeywordToken extends Token {
1513 /** 1527 /**
1514 * The keyword being represented by this token. 1528 * The keyword being represented by this token.
1515 */ 1529 */
1516 Keyword _keyword; 1530 Keyword _keyword;
1517 /** 1531 /**
1518 * Initialize a newly created token to represent the given keyword. 1532 * Initialize a newly created token to represent the given keyword.
1519 * @param keyword the keyword being represented by this token 1533 * @param keyword the keyword being represented by this token
1520 * @param offset the offset from the beginning of the file to the first charac ter in the token 1534 * @param offset the offset from the beginning of the file to the first charac ter in the token
1521 */ 1535 */
1522 KeywordToken(Keyword keyword, int offset) : super(TokenType.KEYWORD, offset) { 1536 KeywordToken(Keyword keyword, int offset) : super(TokenType.KEYWORD, offset) {
1523 this._keyword = keyword; 1537 this._keyword = keyword;
1524 } 1538 }
1525 /** 1539 /**
1526 * Return the keyword being represented by this token. 1540 * Return the keyword being represented by this token.
1527 * @return the keyword being represented by this token 1541 * @return the keyword being represented by this token
1528 */ 1542 */
1529 Keyword get keyword => _keyword; 1543 Keyword get keyword => _keyword;
1530 String get lexeme => _keyword.syntax; 1544 String get lexeme => _keyword.syntax;
1531 Keyword value() => _keyword; 1545 Keyword value() => _keyword;
1532 } 1546 }
1533 /** 1547 /**
1534 * Instances of the class {@code BeginToken} represent the opening half of a gro uping pair of 1548 * Instances of the class {@code BeginToken} represent the opening half of a gro uping pair of
1535 * tokens. This is used for curly brackets ('{'), parentheses ('('), and square brackets ('['). 1549 * tokens. This is used for curly brackets ('{'), parentheses ('('), and square brackets ('[').
1550 * @coverage dart.engine.parser
1536 */ 1551 */
1537 class BeginToken extends Token { 1552 class BeginToken extends Token {
1538 /** 1553 /**
1539 * The token that corresponds to this token. 1554 * The token that corresponds to this token.
1540 */ 1555 */
1541 Token _endToken; 1556 Token _endToken;
1542 /** 1557 /**
1543 * Initialize a newly created token representing the opening half of a groupin g pair of tokens. 1558 * Initialize a newly created token representing the opening half of a groupin g pair of tokens.
1544 * @param type the type of the token 1559 * @param type the type of the token
1545 * @param offset the offset from the beginning of the file to the first charac ter in the token 1560 * @param offset the offset from the beginning of the file to the first charac ter in the token
1546 */ 1561 */
1547 BeginToken(TokenType type, int offset) : super(type, offset) { 1562 BeginToken(TokenType type, int offset) : super(type, offset) {
1548 assert((identical(type, TokenType.OPEN_CURLY_BRACKET) || identical(type, Tok enType.OPEN_PAREN) || identical(type, TokenType.OPEN_SQUARE_BRACKET) || identica l(type, TokenType.STRING_INTERPOLATION_EXPRESSION))); 1563 assert((identical(type, TokenType.OPEN_CURLY_BRACKET) || identical(type, Tok enType.OPEN_PAREN) || identical(type, TokenType.OPEN_SQUARE_BRACKET) || identica l(type, TokenType.STRING_INTERPOLATION_EXPRESSION)));
1549 } 1564 }
1550 /** 1565 /**
1551 * Return the token that corresponds to this token. 1566 * Return the token that corresponds to this token.
1552 * @return the token that corresponds to this token 1567 * @return the token that corresponds to this token
1553 */ 1568 */
1554 Token get endToken => _endToken; 1569 Token get endToken => _endToken;
1555 /** 1570 /**
1556 * Set the token that corresponds to this token to the given token. 1571 * Set the token that corresponds to this token to the given token.
1557 * @param token the token that corresponds to this token 1572 * @param token the token that corresponds to this token
1558 */ 1573 */
1559 void set endToken(Token token) { 1574 void set endToken(Token token) {
1560 this._endToken = token; 1575 this._endToken = token;
1561 } 1576 }
1562 } 1577 }
1563 /** 1578 /**
1564 * The enumeration {@code TokenClass} represents classes (or groups) of tokens w ith a similar use. 1579 * The enumeration {@code TokenClass} represents classes (or groups) of tokens w ith a similar use.
1580 * @coverage dart.engine.parser
1565 */ 1581 */
1566 class TokenClass { 1582 class TokenClass {
1567 /** 1583 /**
1568 * A value used to indicate that the token type is not part of any specific cl ass of token. 1584 * A value used to indicate that the token type is not part of any specific cl ass of token.
1569 */ 1585 */
1570 static final TokenClass NO_CLASS = new TokenClass.con1('NO_CLASS', 0); 1586 static final TokenClass NO_CLASS = new TokenClass.con1('NO_CLASS', 0);
1571 /** 1587 /**
1572 * A value used to indicate that the token type is an additive operator. 1588 * A value used to indicate that the token type is an additive operator.
1573 */ 1589 */
1574 static final TokenClass ADDITIVE_OPERATOR = new TokenClass.con2('ADDITIVE_OPER ATOR', 1, 12); 1590 static final TokenClass ADDITIVE_OPERATOR = new TokenClass.con2('ADDITIVE_OPER ATOR', 1, 12);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 * A value used to indicate that the token type is a unary operator. 1640 * A value used to indicate that the token type is a unary operator.
1625 */ 1641 */
1626 static final TokenClass UNARY_POSTFIX_OPERATOR = new TokenClass.con2('UNARY_PO STFIX_OPERATOR', 14, 15); 1642 static final TokenClass UNARY_POSTFIX_OPERATOR = new TokenClass.con2('UNARY_PO STFIX_OPERATOR', 14, 15);
1627 /** 1643 /**
1628 * A value used to indicate that the token type is a unary operator. 1644 * A value used to indicate that the token type is a unary operator.
1629 */ 1645 */
1630 static final TokenClass UNARY_PREFIX_OPERATOR = new TokenClass.con2('UNARY_PRE FIX_OPERATOR', 15, 14); 1646 static final TokenClass UNARY_PREFIX_OPERATOR = new TokenClass.con2('UNARY_PRE FIX_OPERATOR', 15, 14);
1631 static final List<TokenClass> values = [NO_CLASS, ADDITIVE_OPERATOR, ASSIGNMEN T_OPERATOR, BITWISE_AND_OPERATOR, BITWISE_OR_OPERATOR, BITWISE_XOR_OPERATOR, CAS CADE_OPERATOR, CONDITIONAL_OPERATOR, EQUALITY_OPERATOR, LOGICAL_AND_OPERATOR, LO GICAL_OR_OPERATOR, MULTIPLICATIVE_OPERATOR, RELATIONAL_OPERATOR, SHIFT_OPERATOR, UNARY_POSTFIX_OPERATOR, UNARY_PREFIX_OPERATOR]; 1647 static final List<TokenClass> values = [NO_CLASS, ADDITIVE_OPERATOR, ASSIGNMEN T_OPERATOR, BITWISE_AND_OPERATOR, BITWISE_OR_OPERATOR, BITWISE_XOR_OPERATOR, CAS CADE_OPERATOR, CONDITIONAL_OPERATOR, EQUALITY_OPERATOR, LOGICAL_AND_OPERATOR, LO GICAL_OR_OPERATOR, MULTIPLICATIVE_OPERATOR, RELATIONAL_OPERATOR, SHIFT_OPERATOR, UNARY_POSTFIX_OPERATOR, UNARY_PREFIX_OPERATOR];
1632 String __name; 1648 String __name;
1633 int __ordinal = 0; 1649 int __ordinal = 0;
1650 int get ordinal => __ordinal;
1634 /** 1651 /**
1635 * The precedence of tokens of this class, or {@code 0} if the such tokens do not represent an 1652 * The precedence of tokens of this class, or {@code 0} if the such tokens do not represent an
1636 * operator. 1653 * operator.
1637 */ 1654 */
1638 int _precedence = 0; 1655 int _precedence = 0;
1639 TokenClass.con1(String ___name, int ___ordinal) { 1656 TokenClass.con1(String ___name, int ___ordinal) {
1640 _jtd_constructor_269_impl(___name, ___ordinal); 1657 _jtd_constructor_275_impl(___name, ___ordinal);
1641 } 1658 }
1642 _jtd_constructor_269_impl(String ___name, int ___ordinal) { 1659 _jtd_constructor_275_impl(String ___name, int ___ordinal) {
1643 _jtd_constructor_270_impl(___name, ___ordinal, 0); 1660 _jtd_constructor_276_impl(___name, ___ordinal, 0);
1644 } 1661 }
1645 TokenClass.con2(String ___name, int ___ordinal, int precedence2) { 1662 TokenClass.con2(String ___name, int ___ordinal, int precedence2) {
1646 _jtd_constructor_270_impl(___name, ___ordinal, precedence2); 1663 _jtd_constructor_276_impl(___name, ___ordinal, precedence2);
1647 } 1664 }
1648 _jtd_constructor_270_impl(String ___name, int ___ordinal, int precedence2) { 1665 _jtd_constructor_276_impl(String ___name, int ___ordinal, int precedence2) {
1649 __name = ___name; 1666 __name = ___name;
1650 __ordinal = ___ordinal; 1667 __ordinal = ___ordinal;
1651 this._precedence = precedence2; 1668 this._precedence = precedence2;
1652 } 1669 }
1653 /** 1670 /**
1654 * Return the precedence of tokens of this class, or {@code 0} if the such tok ens do not represent 1671 * Return the precedence of tokens of this class, or {@code 0} if the such tok ens do not represent
1655 * an operator. 1672 * an operator.
1656 * @return the precedence of tokens of this class 1673 * @return the precedence of tokens of this class
1657 */ 1674 */
1658 int get precedence => _precedence; 1675 int get precedence => _precedence;
1659 String toString() => __name; 1676 String toString() => __name;
1660 } 1677 }
1661 /** 1678 /**
1662 * Instances of the class {@code KeywordTokenWithComment} implement a keyword to ken that is preceded 1679 * Instances of the class {@code KeywordTokenWithComment} implement a keyword to ken that is preceded
1663 * by comments. 1680 * by comments.
1681 * @coverage dart.engine.parser
1664 */ 1682 */
1665 class KeywordTokenWithComment extends KeywordToken { 1683 class KeywordTokenWithComment extends KeywordToken {
1666 /** 1684 /**
1667 * The first comment in the list of comments that precede this token. 1685 * The first comment in the list of comments that precede this token.
1668 */ 1686 */
1669 Token _precedingComment; 1687 Token _precedingComment;
1670 /** 1688 /**
1671 * Initialize a newly created token to to represent the given keyword and to b e preceded by the 1689 * Initialize a newly created token to to represent the given keyword and to b e preceded by the
1672 * comments reachable from the given comment. 1690 * comments reachable from the given comment.
1673 * @param keyword the keyword being represented by this token 1691 * @param keyword the keyword being represented by this token
1674 * @param offset the offset from the beginning of the file to the first charac ter in the token 1692 * @param offset the offset from the beginning of the file to the first charac ter in the token
1675 * @param precedingComment the first comment in the list of comments that prec ede this token 1693 * @param precedingComment the first comment in the list of comments that prec ede this token
1676 */ 1694 */
1677 KeywordTokenWithComment(Keyword keyword, int offset, Token precedingComment) : super(keyword, offset) { 1695 KeywordTokenWithComment(Keyword keyword, int offset, Token precedingComment) : super(keyword, offset) {
1678 this._precedingComment = precedingComment; 1696 this._precedingComment = precedingComment;
1679 } 1697 }
1680 Token get precedingComments => _precedingComment; 1698 Token get precedingComments => _precedingComment;
1681 } 1699 }
1682 /** 1700 /**
1683 * The enumeration {@code TokenType} defines the types of tokens that can be ret urned by the 1701 * The enumeration {@code TokenType} defines the types of tokens that can be ret urned by the
1684 * scanner. 1702 * scanner.
1703 * @coverage dart.engine.parser
1685 */ 1704 */
1686 class TokenType { 1705 class TokenType {
1687 /** 1706 /**
1688 * The type of the token that marks the end of the input. 1707 * The type of the token that marks the end of the input.
1689 */ 1708 */
1690 static final TokenType EOF = new TokenType_EOF('EOF', 0, null, ""); 1709 static final TokenType EOF = new TokenType_EOF('EOF', 0, null, "");
1691 static final TokenType DOUBLE = new TokenType.con1('DOUBLE', 1); 1710 static final TokenType DOUBLE = new TokenType.con1('DOUBLE', 1);
1692 static final TokenType HEXADECIMAL = new TokenType.con1('HEXADECIMAL', 2); 1711 static final TokenType HEXADECIMAL = new TokenType.con1('HEXADECIMAL', 2);
1693 static final TokenType IDENTIFIER = new TokenType.con1('IDENTIFIER', 3); 1712 static final TokenType IDENTIFIER = new TokenType.con1('IDENTIFIER', 3);
1694 static final TokenType INT = new TokenType.con1('INT', 4); 1713 static final TokenType INT = new TokenType.con1('INT', 4);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 static final TokenType STRING_INTERPOLATION_IDENTIFIER = new TokenType.con2('S TRING_INTERPOLATION_IDENTIFIER', 61, null, "\$"); 1770 static final TokenType STRING_INTERPOLATION_IDENTIFIER = new TokenType.con2('S TRING_INTERPOLATION_IDENTIFIER', 61, null, "\$");
1752 static final TokenType TILDE = new TokenType.con2('TILDE', 62, TokenClass.UNAR Y_PREFIX_OPERATOR, "~"); 1771 static final TokenType TILDE = new TokenType.con2('TILDE', 62, TokenClass.UNAR Y_PREFIX_OPERATOR, "~");
1753 static final TokenType TILDE_SLASH = new TokenType.con2('TILDE_SLASH', 63, Tok enClass.MULTIPLICATIVE_OPERATOR, "~/"); 1772 static final TokenType TILDE_SLASH = new TokenType.con2('TILDE_SLASH', 63, Tok enClass.MULTIPLICATIVE_OPERATOR, "~/");
1754 static final TokenType TILDE_SLASH_EQ = new TokenType.con2('TILDE_SLASH_EQ', 6 4, TokenClass.ASSIGNMENT_OPERATOR, "~/="); 1773 static final TokenType TILDE_SLASH_EQ = new TokenType.con2('TILDE_SLASH_EQ', 6 4, TokenClass.ASSIGNMENT_OPERATOR, "~/=");
1755 static final TokenType BACKPING = new TokenType.con2('BACKPING', 65, null, "`" ); 1774 static final TokenType BACKPING = new TokenType.con2('BACKPING', 65, null, "`" );
1756 static final TokenType BACKSLASH = new TokenType.con2('BACKSLASH', 66, null, " \\"); 1775 static final TokenType BACKSLASH = new TokenType.con2('BACKSLASH', 66, null, " \\");
1757 static final TokenType PERIOD_PERIOD_PERIOD = new TokenType.con2('PERIOD_PERIO D_PERIOD', 67, null, "..."); 1776 static final TokenType PERIOD_PERIOD_PERIOD = new TokenType.con2('PERIOD_PERIO D_PERIOD', 67, null, "...");
1758 static final List<TokenType> values = [EOF, DOUBLE, HEXADECIMAL, IDENTIFIER, I NT, KEYWORD, MULTI_LINE_COMMENT, SCRIPT_TAG, SINGLE_LINE_COMMENT, STRING, AMPERS AND, AMPERSAND_AMPERSAND, AMPERSAND_EQ, AT, BANG, BANG_EQ, BAR, BAR_BAR, BAR_EQ, COLON, COMMA, CARET, CARET_EQ, CLOSE_CURLY_BRACKET, CLOSE_PAREN, CLOSE_SQUARE_B RACKET, EQ, EQ_EQ, FUNCTION, GT, GT_EQ, GT_GT, GT_GT_EQ, HASH, INDEX, INDEX_EQ, IS, LT, LT_EQ, LT_LT, LT_LT_EQ, MINUS, MINUS_EQ, MINUS_MINUS, OPEN_CURLY_BRACKET , OPEN_PAREN, OPEN_SQUARE_BRACKET, PERCENT, PERCENT_EQ, PERIOD, PERIOD_PERIOD, P LUS, PLUS_EQ, PLUS_PLUS, QUESTION, SEMICOLON, SLASH, SLASH_EQ, STAR, STAR_EQ, ST RING_INTERPOLATION_EXPRESSION, STRING_INTERPOLATION_IDENTIFIER, TILDE, TILDE_SLA SH, TILDE_SLASH_EQ, BACKPING, BACKSLASH, PERIOD_PERIOD_PERIOD]; 1777 static final List<TokenType> values = [EOF, DOUBLE, HEXADECIMAL, IDENTIFIER, I NT, KEYWORD, MULTI_LINE_COMMENT, SCRIPT_TAG, SINGLE_LINE_COMMENT, STRING, AMPERS AND, AMPERSAND_AMPERSAND, AMPERSAND_EQ, AT, BANG, BANG_EQ, BAR, BAR_BAR, BAR_EQ, COLON, COMMA, CARET, CARET_EQ, CLOSE_CURLY_BRACKET, CLOSE_PAREN, CLOSE_SQUARE_B RACKET, EQ, EQ_EQ, FUNCTION, GT, GT_EQ, GT_GT, GT_GT_EQ, HASH, INDEX, INDEX_EQ, IS, LT, LT_EQ, LT_LT, LT_LT_EQ, MINUS, MINUS_EQ, MINUS_MINUS, OPEN_CURLY_BRACKET , OPEN_PAREN, OPEN_SQUARE_BRACKET, PERCENT, PERCENT_EQ, PERIOD, PERIOD_PERIOD, P LUS, PLUS_EQ, PLUS_PLUS, QUESTION, SEMICOLON, SLASH, SLASH_EQ, STAR, STAR_EQ, ST RING_INTERPOLATION_EXPRESSION, STRING_INTERPOLATION_IDENTIFIER, TILDE, TILDE_SLA SH, TILDE_SLASH_EQ, BACKPING, BACKSLASH, PERIOD_PERIOD_PERIOD];
1759 String __name; 1778 String __name;
1760 int __ordinal = 0; 1779 int __ordinal = 0;
1780 int get ordinal => __ordinal;
1761 /** 1781 /**
1762 * The class of the token. 1782 * The class of the token.
1763 */ 1783 */
1764 TokenClass _tokenClass; 1784 TokenClass _tokenClass;
1765 /** 1785 /**
1766 * The lexeme that defines this type of token, or {@code null} if there is mor e than one possible 1786 * The lexeme that defines this type of token, or {@code null} if there is mor e than one possible
1767 * lexeme for this type of token. 1787 * lexeme for this type of token.
1768 */ 1788 */
1769 String _lexeme; 1789 String _lexeme;
1770 TokenType.con1(String ___name, int ___ordinal) { 1790 TokenType.con1(String ___name, int ___ordinal) {
1771 _jtd_constructor_271_impl(___name, ___ordinal); 1791 _jtd_constructor_277_impl(___name, ___ordinal);
1772 } 1792 }
1773 _jtd_constructor_271_impl(String ___name, int ___ordinal) { 1793 _jtd_constructor_277_impl(String ___name, int ___ordinal) {
1774 _jtd_constructor_272_impl(___name, ___ordinal, TokenClass.NO_CLASS, null); 1794 _jtd_constructor_278_impl(___name, ___ordinal, TokenClass.NO_CLASS, null);
1775 } 1795 }
1776 TokenType.con2(String ___name, int ___ordinal, TokenClass tokenClass2, String lexeme2) { 1796 TokenType.con2(String ___name, int ___ordinal, TokenClass tokenClass2, String lexeme2) {
1777 _jtd_constructor_272_impl(___name, ___ordinal, tokenClass2, lexeme2); 1797 _jtd_constructor_278_impl(___name, ___ordinal, tokenClass2, lexeme2);
1778 } 1798 }
1779 _jtd_constructor_272_impl(String ___name, int ___ordinal, TokenClass tokenClas s2, String lexeme2) { 1799 _jtd_constructor_278_impl(String ___name, int ___ordinal, TokenClass tokenClas s2, String lexeme2) {
1780 __name = ___name; 1800 __name = ___name;
1781 __ordinal = ___ordinal; 1801 __ordinal = ___ordinal;
1782 this._tokenClass = tokenClass2 == null ? TokenClass.NO_CLASS : tokenClass2; 1802 this._tokenClass = tokenClass2 == null ? TokenClass.NO_CLASS : tokenClass2;
1783 this._lexeme = lexeme2; 1803 this._lexeme = lexeme2;
1784 } 1804 }
1785 /** 1805 /**
1786 * Return the lexeme that defines this type of token, or {@code null} if there is more than one 1806 * Return the lexeme that defines this type of token, or {@code null} if there is more than one
1787 * possible lexeme for this type of token. 1807 * possible lexeme for this type of token.
1788 * @return the lexeme that defines this type of token 1808 * @return the lexeme that defines this type of token
1789 */ 1809 */
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 * Return {@code true} if this token type represents an operator that can be d efined by users. 1878 * Return {@code true} if this token type represents an operator that can be d efined by users.
1859 * @return {@code true} if this token type represents an operator that can be defined by users 1879 * @return {@code true} if this token type represents an operator that can be defined by users
1860 */ 1880 */
1861 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, "|"); 1881 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, "|");
1862 String toString() => __name; 1882 String toString() => __name;
1863 } 1883 }
1864 class TokenType_EOF extends TokenType { 1884 class TokenType_EOF extends TokenType {
1865 TokenType_EOF(String ___name, int ___ordinal, TokenClass arg0, String arg1) : super.con2(___name, ___ordinal, arg0, arg1); 1885 TokenType_EOF(String ___name, int ___ordinal, TokenClass arg0, String arg1) : super.con2(___name, ___ordinal, arg0, arg1);
1866 String toString() => "-eof-"; 1886 String toString() => "-eof-";
1867 } 1887 }
OLDNEW
« no previous file with comments | « pkg/analyzer-experimental/lib/src/generated/resolver.dart ('k') | pkg/analyzer-experimental/lib/src/generated/sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698