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

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

Issue 12543003: Use limited JavaStringBuilder implementation instead of Dart StringBuffer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak JavaStringBuilder. 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.parser; 4 library engine.parser;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'java_core.dart'; 7 import 'java_core.dart';
8 import 'java_engine.dart'; 8 import 'java_engine.dart';
9 import 'error.dart'; 9 import 'error.dart';
10 import 'source.dart'; 10 import 'source.dart';
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 this._staticKeyword = staticKeyword2; 200 this._staticKeyword = staticKeyword2;
201 } 201 }
202 /** 202 /**
203 * Set the token representing the keyword 'var' to the given token. 203 * Set the token representing the keyword 'var' to the given token.
204 * @param varKeyword the token representing the keyword 'var' 204 * @param varKeyword the token representing the keyword 'var'
205 */ 205 */
206 void set varKeyword(Token varKeyword2) { 206 void set varKeyword(Token varKeyword2) {
207 this._varKeyword = varKeyword2; 207 this._varKeyword = varKeyword2;
208 } 208 }
209 String toString() { 209 String toString() {
210 StringBuffer builder = new StringBuffer(); 210 JavaStringBuilder builder = new JavaStringBuilder();
211 bool needsSpace = appendKeyword(builder, false, _abstractKeyword); 211 bool needsSpace = appendKeyword(builder, false, _abstractKeyword);
212 needsSpace = appendKeyword(builder, needsSpace, _constKeyword); 212 needsSpace = appendKeyword(builder, needsSpace, _constKeyword);
213 needsSpace = appendKeyword(builder, needsSpace, _externalKeyword); 213 needsSpace = appendKeyword(builder, needsSpace, _externalKeyword);
214 needsSpace = appendKeyword(builder, needsSpace, _factoryKeyword); 214 needsSpace = appendKeyword(builder, needsSpace, _factoryKeyword);
215 needsSpace = appendKeyword(builder, needsSpace, _finalKeyword); 215 needsSpace = appendKeyword(builder, needsSpace, _finalKeyword);
216 needsSpace = appendKeyword(builder, needsSpace, _staticKeyword); 216 needsSpace = appendKeyword(builder, needsSpace, _staticKeyword);
217 appendKeyword(builder, needsSpace, _varKeyword); 217 appendKeyword(builder, needsSpace, _varKeyword);
218 return builder.toString(); 218 return builder.toString();
219 } 219 }
220 /** 220 /**
221 * If the given keyword is not {@code null}, append it to the given builder, p refixing it with a 221 * If the given keyword is not {@code null}, append it to the given builder, p refixing it with a
222 * space if needed. 222 * space if needed.
223 * @param builder the builder to which the keyword will be appended 223 * @param builder the builder to which the keyword will be appended
224 * @param needsSpace {@code true} if the keyword needs to be prefixed with a s pace 224 * @param needsSpace {@code true} if the keyword needs to be prefixed with a s pace
225 * @param keyword the keyword to be appended 225 * @param keyword the keyword to be appended
226 * @return {@code true} if subsequent keywords need to be prefixed with a spac e 226 * @return {@code true} if subsequent keywords need to be prefixed with a spac e
227 */ 227 */
228 bool appendKeyword(StringBuffer builder, bool needsSpace, Token keyword) { 228 bool appendKeyword(JavaStringBuilder builder, bool needsSpace, Token keyword) {
229 if (keyword != null) { 229 if (keyword != null) {
230 if (needsSpace) { 230 if (needsSpace) {
231 builder.writeCharCode(0x20); 231 builder.appendChar(0x20);
232 } 232 }
233 builder.write(keyword.lexeme); 233 builder.append(keyword.lexeme);
234 return true; 234 return true;
235 } 235 }
236 return needsSpace; 236 return needsSpace;
237 } 237 }
238 } 238 }
239 /** 239 /**
240 * Instances of the class {@code Parser} are used to parse tokens into an AST st ructure. 240 * Instances of the class {@code Parser} are used to parse tokens into an AST st ructure.
241 */ 241 */
242 class Parser { 242 class Parser {
243 /** 243 /**
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 /** 325 /**
326 * Append the character equivalent of the given scalar value to the given buil der. Use the start 326 * Append the character equivalent of the given scalar value to the given buil der. Use the start
327 * and end indices to report an error, and don't append anything to the builde r, if the scalar 327 * and end indices to report an error, and don't append anything to the builde r, if the scalar
328 * value is invalid. 328 * value is invalid.
329 * @param builder the builder to which the scalar value is to be appended 329 * @param builder the builder to which the scalar value is to be appended
330 * @param escapeSequence the escape sequence that was parsed to produce the sc alar value 330 * @param escapeSequence the escape sequence that was parsed to produce the sc alar value
331 * @param scalarValue the value to be appended 331 * @param scalarValue the value to be appended
332 * @param startIndex the index of the first character representing the scalar value 332 * @param startIndex the index of the first character representing the scalar value
333 * @param endIndex the index of the last character representing the scalar val ue 333 * @param endIndex the index of the last character representing the scalar val ue
334 */ 334 */
335 void appendScalarValue(StringBuffer builder, String escapeSequence, int scalar Value, int startIndex, int endIndex) { 335 void appendScalarValue(JavaStringBuilder builder, String escapeSequence, int s calarValue, int startIndex, int endIndex) {
336 if (scalarValue < 0 || scalarValue > Character.MAX_CODE_POINT || (scalarValu e >= 0xD800 && scalarValue <= 0xDFFF)) { 336 if (scalarValue < 0 || scalarValue > Character.MAX_CODE_POINT || (scalarValu e >= 0xD800 && scalarValue <= 0xDFFF)) {
337 reportError4(ParserErrorCode.INVALID_CODE_POINT, [escapeSequence]); 337 reportError4(ParserErrorCode.INVALID_CODE_POINT, [escapeSequence]);
338 return; 338 return;
339 } 339 }
340 if (scalarValue < Character.MAX_VALUE) { 340 if (scalarValue < Character.MAX_VALUE) {
341 builder.writeCharCode((scalarValue as int)); 341 builder.appendChar((scalarValue as int));
342 } else { 342 } else {
343 builder.write(Character.toChars(scalarValue)); 343 builder.append(Character.toChars(scalarValue));
344 } 344 }
345 } 345 }
346 /** 346 /**
347 * Compute the content of a string with the given literal representation. 347 * Compute the content of a string with the given literal representation.
348 * @param lexeme the literal representation of the string 348 * @param lexeme the literal representation of the string
349 * @return the actual value of the string 349 * @return the actual value of the string
350 */ 350 */
351 String computeStringValue(String lexeme) { 351 String computeStringValue(String lexeme) {
352 if (lexeme.startsWith("r\"\"\"") || lexeme.startsWith("r'''")) { 352 if (lexeme.startsWith("r\"\"\"") || lexeme.startsWith("r'''")) {
353 if (lexeme.length > 4) { 353 if (lexeme.length > 4) {
354 return lexeme.substring(4, lexeme.length - 3); 354 return lexeme.substring(4, lexeme.length - 3);
355 } 355 }
356 } else if (lexeme.startsWith("r\"") || lexeme.startsWith("r'")) { 356 } else if (lexeme.startsWith("r\"") || lexeme.startsWith("r'")) {
357 if (lexeme.length > 2) { 357 if (lexeme.length > 2) {
358 return lexeme.substring(2, lexeme.length - 1); 358 return lexeme.substring(2, lexeme.length - 1);
359 } 359 }
360 } 360 }
361 int start = 0; 361 int start = 0;
362 if (lexeme.startsWith("\"\"\"") || lexeme.startsWith("'''")) { 362 if (lexeme.startsWith("\"\"\"") || lexeme.startsWith("'''")) {
363 start += 3; 363 start += 3;
364 } else if (lexeme.startsWith("\"") || lexeme.startsWith("'")) { 364 } else if (lexeme.startsWith("\"") || lexeme.startsWith("'")) {
365 start += 1; 365 start += 1;
366 } 366 }
367 int end = lexeme.length; 367 int end = lexeme.length;
368 if (end > 3 && (lexeme.endsWith("\"\"\"") || lexeme.endsWith("'''"))) { 368 if (end > 3 && (lexeme.endsWith("\"\"\"") || lexeme.endsWith("'''"))) {
369 end -= 3; 369 end -= 3;
370 } else if (end > 1 && (lexeme.endsWith("\"") || lexeme.endsWith("'"))) { 370 } else if (end > 1 && (lexeme.endsWith("\"") || lexeme.endsWith("'"))) {
371 end -= 1; 371 end -= 1;
372 } 372 }
373 StringBuffer builder = new StringBuffer(); 373 JavaStringBuilder builder = new JavaStringBuilder();
374 int index = start; 374 int index = start;
375 while (index < end) { 375 while (index < end) {
376 index = translateCharacter(builder, lexeme, index); 376 index = translateCharacter(builder, lexeme, index);
377 } 377 }
378 return builder.toString(); 378 return builder.toString();
379 } 379 }
380 /** 380 /**
381 * Create a synthetic identifier. 381 * Create a synthetic identifier.
382 * @return the synthetic identifier that was created 382 * @return the synthetic identifier that was created
383 */ 383 */
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 * classDeclaration ::= 1075 * classDeclaration ::=
1076 * metadata 'abstract'? 'class' name typeParameterList? (extendsClause withCla use?)? implementsClause? '{' classMembers '}' 1076 * metadata 'abstract'? 'class' name typeParameterList? (extendsClause withCla use?)? implementsClause? '{' classMembers '}'
1077 * </pre> 1077 * </pre>
1078 * @param commentAndMetadata the metadata to be associated with the member 1078 * @param commentAndMetadata the metadata to be associated with the member
1079 * @param abstractKeyword the token for the keyword 'abstract', or {@code null } if the keyword was 1079 * @param abstractKeyword the token for the keyword 'abstract', or {@code null } if the keyword was
1080 * not given 1080 * not given
1081 * @return the class declaration that was parsed 1081 * @return the class declaration that was parsed
1082 */ 1082 */
1083 ClassDeclaration parseClassDeclaration(CommentAndMetadata commentAndMetadata, Token abstractKeyword) { 1083 ClassDeclaration parseClassDeclaration(CommentAndMetadata commentAndMetadata, Token abstractKeyword) {
1084 Token keyword = expect(Keyword.CLASS); 1084 Token keyword = expect(Keyword.CLASS);
1085 SimpleIdentifier name = parseSimpleIdentifier2(ParserErrorCode.BUILT_IN_IDEN TIFIER_AS_TYPE_NAME); 1085 SimpleIdentifier name = parseSimpleIdentifier();
1086 String className = name.name; 1086 String className = name.name;
1087 TypeParameterList typeParameters = null; 1087 TypeParameterList typeParameters = null;
1088 if (matches5(TokenType.LT)) { 1088 if (matches5(TokenType.LT)) {
1089 typeParameters = parseTypeParameterList(); 1089 typeParameters = parseTypeParameterList();
1090 } 1090 }
1091 ExtendsClause extendsClause = null; 1091 ExtendsClause extendsClause = null;
1092 WithClause withClause = null; 1092 WithClause withClause = null;
1093 ImplementsClause implementsClause = null; 1093 ImplementsClause implementsClause = null;
1094 bool foundClause = true; 1094 bool foundClause = true;
1095 while (foundClause) { 1095 while (foundClause) {
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 * </pre> 2353 * </pre>
2354 * @param commentAndMetadata the metadata to be associated with the member 2354 * @param commentAndMetadata the metadata to be associated with the member
2355 * @param keyword the token representing the 'typedef' keyword 2355 * @param keyword the token representing the 'typedef' keyword
2356 * @return the function type alias that was parsed 2356 * @return the function type alias that was parsed
2357 */ 2357 */
2358 FunctionTypeAlias parseFunctionTypeAlias(CommentAndMetadata commentAndMetadata , Token keyword) { 2358 FunctionTypeAlias parseFunctionTypeAlias(CommentAndMetadata commentAndMetadata , Token keyword) {
2359 TypeName returnType = null; 2359 TypeName returnType = null;
2360 if (hasReturnTypeInTypeAlias()) { 2360 if (hasReturnTypeInTypeAlias()) {
2361 returnType = parseReturnType(); 2361 returnType = parseReturnType();
2362 } 2362 }
2363 SimpleIdentifier name = parseSimpleIdentifier2(ParserErrorCode.BUILT_IN_IDEN TIFIER_AS_TYPEDEF_NAME); 2363 SimpleIdentifier name = parseSimpleIdentifier();
2364 TypeParameterList typeParameters = null; 2364 TypeParameterList typeParameters = null;
2365 if (matches5(TokenType.LT)) { 2365 if (matches5(TokenType.LT)) {
2366 typeParameters = parseTypeParameterList(); 2366 typeParameters = parseTypeParameterList();
2367 } 2367 }
2368 if (matches5(TokenType.SEMICOLON) || matches5(TokenType.EOF)) { 2368 if (matches5(TokenType.SEMICOLON) || matches5(TokenType.EOF)) {
2369 reportError4(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []); 2369 reportError4(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []);
2370 FormalParameterList parameters = new FormalParameterList.full(createSynthe ticToken(TokenType.OPEN_PAREN), null, null, null, createSyntheticToken(TokenType .CLOSE_PAREN)); 2370 FormalParameterList parameters = new FormalParameterList.full(createSynthe ticToken(TokenType.OPEN_PAREN), null, null, null, createSyntheticToken(TokenType .CLOSE_PAREN));
2371 Token semicolon = expect2(TokenType.SEMICOLON); 2371 Token semicolon = expect2(TokenType.SEMICOLON);
2372 return new FunctionTypeAlias.full(commentAndMetadata.comment, commentAndMe tadata.metadata, keyword, returnType, name, typeParameters, parameters, semicolo n); 2372 return new FunctionTypeAlias.full(commentAndMetadata.comment, commentAndMe tadata.metadata, keyword, returnType, name, typeParameters, parameters, semicolo n);
2373 } else if (!matches5(TokenType.OPEN_PAREN)) { 2373 } else if (!matches5(TokenType.OPEN_PAREN)) {
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
3359 * @return the simple identifier that was parsed 3359 * @return the simple identifier that was parsed
3360 */ 3360 */
3361 SimpleIdentifier parseSimpleIdentifier() { 3361 SimpleIdentifier parseSimpleIdentifier() {
3362 if (matchesIdentifier()) { 3362 if (matchesIdentifier()) {
3363 return new SimpleIdentifier.full(andAdvance); 3363 return new SimpleIdentifier.full(andAdvance);
3364 } 3364 }
3365 reportError4(ParserErrorCode.MISSING_IDENTIFIER, []); 3365 reportError4(ParserErrorCode.MISSING_IDENTIFIER, []);
3366 return createSyntheticIdentifier(); 3366 return createSyntheticIdentifier();
3367 } 3367 }
3368 /** 3368 /**
3369 * Parse a simple identifier and validate that it is not a built-in identifier .
3370 * <pre>
3371 * identifier ::=
3372 * IDENTIFIER
3373 * </pre>
3374 * @param errorCode the error code to be used to report a built-in identifier if one is found
3375 * @return the simple identifier that was parsed
3376 */
3377 SimpleIdentifier parseSimpleIdentifier2(ParserErrorCode errorCode) {
3378 if (matchesIdentifier()) {
3379 Token token = andAdvance;
3380 if (identical(token.type, TokenType.KEYWORD)) {
3381 reportError5(errorCode, token, [token.lexeme]);
3382 }
3383 return new SimpleIdentifier.full(token);
3384 }
3385 reportError4(ParserErrorCode.MISSING_IDENTIFIER, []);
3386 return createSyntheticIdentifier();
3387 }
3388 /**
3389 * Parse a statement. 3369 * Parse a statement.
3390 * <pre> 3370 * <pre>
3391 * statement ::= 3371 * statement ::=
3392 * label* nonLabeledStatement 3372 * label* nonLabeledStatement
3393 * </pre> 3373 * </pre>
3394 * @return the statement that was parsed 3374 * @return the statement that was parsed
3395 */ 3375 */
3396 Statement parseStatement2() { 3376 Statement parseStatement2() {
3397 List<Label> labels = new List<Label>(); 3377 List<Label> labels = new List<Label>();
3398 while (matchesIdentifier() && matches4(peek(), TokenType.COLON)) { 3378 while (matchesIdentifier() && matches4(peek(), TokenType.COLON)) {
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
3725 /** 3705 /**
3726 * Parse a type parameter. 3706 * Parse a type parameter.
3727 * <pre> 3707 * <pre>
3728 * typeParameter ::= 3708 * typeParameter ::=
3729 * metadata name ('extends' bound)? 3709 * metadata name ('extends' bound)?
3730 * </pre> 3710 * </pre>
3731 * @return the type parameter that was parsed 3711 * @return the type parameter that was parsed
3732 */ 3712 */
3733 TypeParameter parseTypeParameter() { 3713 TypeParameter parseTypeParameter() {
3734 CommentAndMetadata commentAndMetadata = parseCommentAndMetadata(); 3714 CommentAndMetadata commentAndMetadata = parseCommentAndMetadata();
3735 SimpleIdentifier name = parseSimpleIdentifier2(ParserErrorCode.BUILT_IN_IDEN TIFIER_AS_TYPE_VARIABLE_NAME); 3715 SimpleIdentifier name = parseSimpleIdentifier();
3736 if (matches(Keyword.EXTENDS)) { 3716 if (matches(Keyword.EXTENDS)) {
3737 Token keyword = andAdvance; 3717 Token keyword = andAdvance;
3738 TypeName bound = parseTypeName(); 3718 TypeName bound = parseTypeName();
3739 return new TypeParameter.full(commentAndMetadata.comment, commentAndMetada ta.metadata, name, keyword, bound); 3719 return new TypeParameter.full(commentAndMetadata.comment, commentAndMetada ta.metadata, name, keyword, bound);
3740 } 3720 }
3741 return new TypeParameter.full(commentAndMetadata.comment, commentAndMetadata .metadata, name, null, null); 3721 return new TypeParameter.full(commentAndMetadata.comment, commentAndMetadata .metadata, name, null, null);
3742 } 3722 }
3743 /** 3723 /**
3744 * Parse a list of type parameters. 3724 * Parse a list of type parameters.
3745 * <pre> 3725 * <pre>
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
4307 return next6; 4287 return next6;
4308 } 4288 }
4309 /** 4289 /**
4310 * Translate the characters at the given index in the given string, appending the translated 4290 * Translate the characters at the given index in the given string, appending the translated
4311 * character to the given builder. The index is assumed to be valid. 4291 * character to the given builder. The index is assumed to be valid.
4312 * @param builder the builder to which the translated character is to be appen ded 4292 * @param builder the builder to which the translated character is to be appen ded
4313 * @param lexeme the string containing the character(s) to be translated 4293 * @param lexeme the string containing the character(s) to be translated
4314 * @param index the index of the character to be translated 4294 * @param index the index of the character to be translated
4315 * @return the index of the next character to be translated 4295 * @return the index of the next character to be translated
4316 */ 4296 */
4317 int translateCharacter(StringBuffer builder, String lexeme, int index) { 4297 int translateCharacter(JavaStringBuilder builder, String lexeme, int index) {
4318 int currentChar = lexeme.codeUnitAt(index); 4298 int currentChar = lexeme.codeUnitAt(index);
4319 if (currentChar != 0x5C) { 4299 if (currentChar != 0x5C) {
4320 builder.writeCharCode(currentChar); 4300 builder.appendChar(currentChar);
4321 return index + 1; 4301 return index + 1;
4322 } 4302 }
4323 int length8 = lexeme.length; 4303 int length8 = lexeme.length;
4324 int currentIndex = index + 1; 4304 int currentIndex = index + 1;
4325 if (currentIndex >= length8) { 4305 if (currentIndex >= length8) {
4326 return length8; 4306 return length8;
4327 } 4307 }
4328 currentChar = lexeme.codeUnitAt(currentIndex); 4308 currentChar = lexeme.codeUnitAt(currentIndex);
4329 if (currentChar == 0x6E) { 4309 if (currentChar == 0x6E) {
4330 builder.writeCharCode(0xA); 4310 builder.appendChar(0xA);
4331 } else if (currentChar == 0x72) { 4311 } else if (currentChar == 0x72) {
4332 builder.writeCharCode(0xD); 4312 builder.appendChar(0xD);
4333 } else if (currentChar == 0x66) { 4313 } else if (currentChar == 0x66) {
4334 builder.writeCharCode(0xC); 4314 builder.appendChar(0xC);
4335 } else if (currentChar == 0x62) { 4315 } else if (currentChar == 0x62) {
4336 builder.writeCharCode(0x8); 4316 builder.appendChar(0x8);
4337 } else if (currentChar == 0x74) { 4317 } else if (currentChar == 0x74) {
4338 builder.writeCharCode(0x9); 4318 builder.appendChar(0x9);
4339 } else if (currentChar == 0x76) { 4319 } else if (currentChar == 0x76) {
4340 builder.writeCharCode(0xB); 4320 builder.appendChar(0xB);
4341 } else if (currentChar == 0x78) { 4321 } else if (currentChar == 0x78) {
4342 if (currentIndex + 2 >= length8) { 4322 if (currentIndex + 2 >= length8) {
4343 reportError4(ParserErrorCode.INVALID_HEX_ESCAPE, []); 4323 reportError4(ParserErrorCode.INVALID_HEX_ESCAPE, []);
4344 return length8; 4324 return length8;
4345 } 4325 }
4346 int firstDigit = lexeme.codeUnitAt(currentIndex + 1); 4326 int firstDigit = lexeme.codeUnitAt(currentIndex + 1);
4347 int secondDigit = lexeme.codeUnitAt(currentIndex + 2); 4327 int secondDigit = lexeme.codeUnitAt(currentIndex + 2);
4348 if (!isHexDigit(firstDigit) || !isHexDigit(secondDigit)) { 4328 if (!isHexDigit(firstDigit) || !isHexDigit(secondDigit)) {
4349 reportError4(ParserErrorCode.INVALID_HEX_ESCAPE, []); 4329 reportError4(ParserErrorCode.INVALID_HEX_ESCAPE, []);
4350 } else { 4330 } else {
4351 builder.writeCharCode((((Character.digit(firstDigit, 16) << 4) + Charact er.digit(secondDigit, 16)) as int)); 4331 builder.appendChar((((Character.digit(firstDigit, 16) << 4) + Character. digit(secondDigit, 16)) as int));
4352 } 4332 }
4353 return currentIndex + 3; 4333 return currentIndex + 3;
4354 } else if (currentChar == 0x75) { 4334 } else if (currentChar == 0x75) {
4355 currentIndex++; 4335 currentIndex++;
4356 if (currentIndex >= length8) { 4336 if (currentIndex >= length8) {
4357 reportError4(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); 4337 reportError4(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
4358 return length8; 4338 return length8;
4359 } 4339 }
4360 currentChar = lexeme.codeUnitAt(currentIndex); 4340 currentChar = lexeme.codeUnitAt(currentIndex);
4361 if (currentChar == 0x7B) { 4341 if (currentChar == 0x7B) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
4400 int thirdDigit = lexeme.codeUnitAt(currentIndex + 2); 4380 int thirdDigit = lexeme.codeUnitAt(currentIndex + 2);
4401 int fourthDigit = lexeme.codeUnitAt(currentIndex + 3); 4381 int fourthDigit = lexeme.codeUnitAt(currentIndex + 3);
4402 if (!isHexDigit(firstDigit) || !isHexDigit(secondDigit) || !isHexDigit(t hirdDigit) || !isHexDigit(fourthDigit)) { 4382 if (!isHexDigit(firstDigit) || !isHexDigit(secondDigit) || !isHexDigit(t hirdDigit) || !isHexDigit(fourthDigit)) {
4403 reportError4(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); 4383 reportError4(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
4404 } else { 4384 } else {
4405 appendScalarValue(builder, lexeme.substring(index, currentIndex + 1), ((((((Character.digit(firstDigit, 16) << 4) + Character.digit(secondDigit, 16)) << 4) + Character.digit(thirdDigit, 16)) << 4) + Character.digit(fourthDigit, 16 )), index, currentIndex + 3); 4385 appendScalarValue(builder, lexeme.substring(index, currentIndex + 1), ((((((Character.digit(firstDigit, 16) << 4) + Character.digit(secondDigit, 16)) << 4) + Character.digit(thirdDigit, 16)) << 4) + Character.digit(fourthDigit, 16 )), index, currentIndex + 3);
4406 } 4386 }
4407 return currentIndex + 4; 4387 return currentIndex + 4;
4408 } 4388 }
4409 } else { 4389 } else {
4410 builder.writeCharCode(currentChar); 4390 builder.appendChar(currentChar);
4411 } 4391 }
4412 return currentIndex + 1; 4392 return currentIndex + 1;
4413 } 4393 }
4414 /** 4394 /**
4415 * Validate that the given parameter list does not contain any field initializ ers. 4395 * Validate that the given parameter list does not contain any field initializ ers.
4416 * @param parameterList the parameter list to be validated 4396 * @param parameterList the parameter list to be validated
4417 */ 4397 */
4418 void validateFormalParameterList(FormalParameterList parameterList) { 4398 void validateFormalParameterList(FormalParameterList parameterList) {
4419 for (FormalParameter parameter in parameterList.parameters) { 4399 for (FormalParameter parameter in parameterList.parameters) {
4420 if (parameter is FieldFormalParameter) { 4400 if (parameter is FieldFormalParameter) {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
4664 * that caused the error to be generated and for the error message to explain wh at is wrong and, 4644 * that caused the error to be generated and for the error message to explain wh at is wrong and,
4665 * when appropriate, how the problem can be corrected. 4645 * when appropriate, how the problem can be corrected.
4666 */ 4646 */
4667 class ParserErrorCode implements ErrorCode { 4647 class ParserErrorCode implements ErrorCode {
4668 static final ParserErrorCode ABSTRACT_CLASS_MEMBER = new ParserErrorCode.con2( 'ABSTRACT_CLASS_MEMBER', 0, "Members of classes cannot be declared to be 'abstra ct'"); 4648 static final ParserErrorCode ABSTRACT_CLASS_MEMBER = new ParserErrorCode.con2( 'ABSTRACT_CLASS_MEMBER', 0, "Members of classes cannot be declared to be 'abstra ct'");
4669 static final ParserErrorCode ABSTRACT_STATIC_METHOD = new ParserErrorCode.con2 ('ABSTRACT_STATIC_METHOD', 1, "Static methods cannot be declared to be 'abstract '"); 4649 static final ParserErrorCode ABSTRACT_STATIC_METHOD = new ParserErrorCode.con2 ('ABSTRACT_STATIC_METHOD', 1, "Static methods cannot be declared to be 'abstract '");
4670 static final ParserErrorCode ABSTRACT_TOP_LEVEL_FUNCTION = new ParserErrorCode .con2('ABSTRACT_TOP_LEVEL_FUNCTION', 2, "Top-level functions cannot be declared to be 'abstract'"); 4650 static final ParserErrorCode ABSTRACT_TOP_LEVEL_FUNCTION = new ParserErrorCode .con2('ABSTRACT_TOP_LEVEL_FUNCTION', 2, "Top-level functions cannot be declared to be 'abstract'");
4671 static final ParserErrorCode ABSTRACT_TOP_LEVEL_VARIABLE = new ParserErrorCode .con2('ABSTRACT_TOP_LEVEL_VARIABLE', 3, "Top-level variables cannot be declared to be 'abstract'"); 4651 static final ParserErrorCode ABSTRACT_TOP_LEVEL_VARIABLE = new ParserErrorCode .con2('ABSTRACT_TOP_LEVEL_VARIABLE', 3, "Top-level variables cannot be declared to be 'abstract'");
4672 static final ParserErrorCode ABSTRACT_TYPEDEF = new ParserErrorCode.con2('ABST RACT_TYPEDEF', 4, "Type aliases cannot be declared to be 'abstract'"); 4652 static final ParserErrorCode ABSTRACT_TYPEDEF = new ParserErrorCode.con2('ABST RACT_TYPEDEF', 4, "Type aliases cannot be declared to be 'abstract'");
4673 static final ParserErrorCode BREAK_OUTSIDE_OF_LOOP = new ParserErrorCode.con2( 'BREAK_OUTSIDE_OF_LOOP', 5, "A break statement cannot be used outside of a loop or switch statement"); 4653 static final ParserErrorCode BREAK_OUTSIDE_OF_LOOP = new ParserErrorCode.con2( 'BREAK_OUTSIDE_OF_LOOP', 5, "A break statement cannot be used outside of a loop or switch statement");
4674 static final ParserErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME = new ParserErro rCode.con2('BUILT_IN_IDENTIFIER_AS_TYPE_NAME', 6, "The built-in identifier '%s' cannot be used as a type name"); 4654 static final ParserErrorCode CONST_AND_FINAL = new ParserErrorCode.con2('CONST _AND_FINAL', 6, "Members cannot be declared to be both 'const' and 'final'");
4675 static final ParserErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME = new ParserE rrorCode.con2('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME', 7, "The built-in identifier '%s' cannot be used as a type alias name"); 4655 static final ParserErrorCode CONST_AND_VAR = new ParserErrorCode.con2('CONST_A ND_VAR', 7, "Members cannot be declared to be both 'const' and 'var'");
4676 static final ParserErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME = new P arserErrorCode.con2('BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME', 8, "The built-i n identifier '%s' cannot be used as a type variable name"); 4656 static final ParserErrorCode CONST_CLASS = new ParserErrorCode.con2('CONST_CLA SS', 8, "Classes cannot be declared to be 'const'");
4677 static final ParserErrorCode CONST_AND_FINAL = new ParserErrorCode.con2('CONST _AND_FINAL', 9, "Members cannot be declared to be both 'const' and 'final'"); 4657 static final ParserErrorCode CONST_METHOD = new ParserErrorCode.con2('CONST_ME THOD', 9, "Getters, setters and methods cannot be declared to be 'const'");
4678 static final ParserErrorCode CONST_AND_VAR = new ParserErrorCode.con2('CONST_A ND_VAR', 10, "Members cannot be declared to be both 'const' and 'var'"); 4658 static final ParserErrorCode CONST_TYPEDEF = new ParserErrorCode.con2('CONST_T YPEDEF', 10, "Type aliases cannot be declared to be 'const'");
4679 static final ParserErrorCode CONST_CLASS = new ParserErrorCode.con2('CONST_CLA SS', 11, "Classes cannot be declared to be 'const'"); 4659 static final ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE = new ParserErrorCod e.con2('CONSTRUCTOR_WITH_RETURN_TYPE', 11, "Constructors cannot have a return ty pe");
4680 static final ParserErrorCode CONST_METHOD = new ParserErrorCode.con2('CONST_ME THOD', 12, "Getters, setters and methods cannot be declared to be 'const'"); 4660 static final ParserErrorCode CONTINUE_OUTSIDE_OF_LOOP = new ParserErrorCode.co n2('CONTINUE_OUTSIDE_OF_LOOP', 12, "A continue statement cannot be used outside of a loop or switch statement");
4681 static final ParserErrorCode CONST_TYPEDEF = new ParserErrorCode.con2('CONST_T YPEDEF', 13, "Type aliases cannot be declared to be 'const'"); 4661 static final ParserErrorCode CONTINUE_WITHOUT_LABEL_IN_CASE = new ParserErrorC ode.con2('CONTINUE_WITHOUT_LABEL_IN_CASE', 13, "A continue statement in a switch statement must have a label as a target");
4682 static final ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE = new ParserErrorCod e.con2('CONSTRUCTOR_WITH_RETURN_TYPE', 14, "Constructors cannot have a return ty pe"); 4662 static final ParserErrorCode DIRECTIVE_AFTER_DECLARATION = new ParserErrorCode .con2('DIRECTIVE_AFTER_DECLARATION', 14, "Directives must appear before any decl arations");
4683 static final ParserErrorCode CONTINUE_OUTSIDE_OF_LOOP = new ParserErrorCode.co n2('CONTINUE_OUTSIDE_OF_LOOP', 15, "A continue statement cannot be used outside of a loop or switch statement"); 4663 static final ParserErrorCode DUPLICATE_LABEL_IN_SWITCH_STATEMENT = new ParserE rrorCode.con2('DUPLICATE_LABEL_IN_SWITCH_STATEMENT', 15, "The label %s was alrea dy used in this switch statement");
4684 static final ParserErrorCode CONTINUE_WITHOUT_LABEL_IN_CASE = new ParserErrorC ode.con2('CONTINUE_WITHOUT_LABEL_IN_CASE', 16, "A continue statement in a switch statement must have a label as a target"); 4664 static final ParserErrorCode DUPLICATED_MODIFIER = new ParserErrorCode.con2('D UPLICATED_MODIFIER', 16, "The modifier '%s' was already specified.");
4685 static final ParserErrorCode DIRECTIVE_AFTER_DECLARATION = new ParserErrorCode .con2('DIRECTIVE_AFTER_DECLARATION', 17, "Directives must appear before any decl arations"); 4665 static final ParserErrorCode EXPECTED_CASE_OR_DEFAULT = new ParserErrorCode.co n2('EXPECTED_CASE_OR_DEFAULT', 17, "Expected 'case' or 'default'");
4686 static final ParserErrorCode DUPLICATE_LABEL_IN_SWITCH_STATEMENT = new ParserE rrorCode.con2('DUPLICATE_LABEL_IN_SWITCH_STATEMENT', 18, "The label %s was alrea dy used in this switch statement"); 4666 static final ParserErrorCode EXPECTED_LIST_OR_MAP_LITERAL = new ParserErrorCod e.con2('EXPECTED_LIST_OR_MAP_LITERAL', 18, "Expected a list or map literal");
4687 static final ParserErrorCode DUPLICATED_MODIFIER = new ParserErrorCode.con2('D UPLICATED_MODIFIER', 19, "The modifier '%s' was already specified."); 4667 static final ParserErrorCode EXPECTED_STRING_LITERAL = new ParserErrorCode.con 2('EXPECTED_STRING_LITERAL', 19, "Expected a string literal");
4688 static final ParserErrorCode EXPECTED_CASE_OR_DEFAULT = new ParserErrorCode.co n2('EXPECTED_CASE_OR_DEFAULT', 20, "Expected 'case' or 'default'"); 4668 static final ParserErrorCode EXPECTED_TOKEN = new ParserErrorCode.con2('EXPECT ED_TOKEN', 20, "Expected to find: %s");
4689 static final ParserErrorCode EXPECTED_LIST_OR_MAP_LITERAL = new ParserErrorCod e.con2('EXPECTED_LIST_OR_MAP_LITERAL', 21, "Expected a list or map literal"); 4669 static final ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = new Parse rErrorCode.con2('EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 21, "Export directives must preceed part directives");
4690 static final ParserErrorCode EXPECTED_STRING_LITERAL = new ParserErrorCode.con 2('EXPECTED_STRING_LITERAL', 22, "Expected a string literal"); 4670 static final ParserErrorCode EXTERNAL_AFTER_CONST = new ParserErrorCode.con2(' EXTERNAL_AFTER_CONST', 22, "The modifier 'external' should be before the modifie r 'const'");
4691 static final ParserErrorCode EXPECTED_TOKEN = new ParserErrorCode.con2('EXPECT ED_TOKEN', 23, "Expected to find: %s"); 4671 static final ParserErrorCode EXTERNAL_AFTER_FACTORY = new ParserErrorCode.con2 ('EXTERNAL_AFTER_FACTORY', 23, "The modifier 'external' should be before the mod ifier 'factory'");
4692 static final ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = new Parse rErrorCode.con2('EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 24, "Export directives must preceed part directives"); 4672 static final ParserErrorCode EXTERNAL_AFTER_STATIC = new ParserErrorCode.con2( 'EXTERNAL_AFTER_STATIC', 24, "The modifier 'external' should be before the modif ier 'static'");
4693 static final ParserErrorCode EXTERNAL_AFTER_CONST = new ParserErrorCode.con2(' EXTERNAL_AFTER_CONST', 25, "The modifier 'external' should be before the modifie r 'const'"); 4673 static final ParserErrorCode EXTERNAL_CLASS = new ParserErrorCode.con2('EXTERN AL_CLASS', 25, "Classes cannot be declared to be 'external'");
4694 static final ParserErrorCode EXTERNAL_AFTER_FACTORY = new ParserErrorCode.con2 ('EXTERNAL_AFTER_FACTORY', 26, "The modifier 'external' should be before the mod ifier 'factory'"); 4674 static final ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY = new ParserErrorC ode.con2('EXTERNAL_CONSTRUCTOR_WITH_BODY', 26, "External constructors cannot hav e a body");
4695 static final ParserErrorCode EXTERNAL_AFTER_STATIC = new ParserErrorCode.con2( 'EXTERNAL_AFTER_STATIC', 27, "The modifier 'external' should be before the modif ier 'static'"); 4675 static final ParserErrorCode EXTERNAL_FIELD = new ParserErrorCode.con2('EXTERN AL_FIELD', 27, "Fields cannot be declared to be 'external'");
4696 static final ParserErrorCode EXTERNAL_CLASS = new ParserErrorCode.con2('EXTERN AL_CLASS', 28, "Classes cannot be declared to be 'external'"); 4676 static final ParserErrorCode EXTERNAL_GETTER_WITH_BODY = new ParserErrorCode.c on2('EXTERNAL_GETTER_WITH_BODY', 28, "External getters cannot have a body");
4697 static final ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY = new ParserErrorC ode.con2('EXTERNAL_CONSTRUCTOR_WITH_BODY', 29, "External constructors cannot hav e a body"); 4677 static final ParserErrorCode EXTERNAL_METHOD_WITH_BODY = new ParserErrorCode.c on2('EXTERNAL_METHOD_WITH_BODY', 29, "External methods cannot have a body");
4698 static final ParserErrorCode EXTERNAL_FIELD = new ParserErrorCode.con2('EXTERN AL_FIELD', 30, "Fields cannot be declared to be 'external'"); 4678 static final ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = new ParserErrorCode .con2('EXTERNAL_OPERATOR_WITH_BODY', 30, "External operators cannot have a body" );
4699 static final ParserErrorCode EXTERNAL_GETTER_WITH_BODY = new ParserErrorCode.c on2('EXTERNAL_GETTER_WITH_BODY', 31, "External getters cannot have a body"); 4679 static final ParserErrorCode EXTERNAL_SETTER_WITH_BODY = new ParserErrorCode.c on2('EXTERNAL_SETTER_WITH_BODY', 31, "External setters cannot have a body");
4700 static final ParserErrorCode EXTERNAL_METHOD_WITH_BODY = new ParserErrorCode.c on2('EXTERNAL_METHOD_WITH_BODY', 32, "External methods cannot have a body"); 4680 static final ParserErrorCode EXTERNAL_TYPEDEF = new ParserErrorCode.con2('EXTE RNAL_TYPEDEF', 32, "Type aliases cannot be declared to be 'external'");
4701 static final ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = new ParserErrorCode .con2('EXTERNAL_OPERATOR_WITH_BODY', 33, "External operators cannot have a body" ); 4681 static final ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION = new ParserErrorCo de.con2('FACTORY_TOP_LEVEL_DECLARATION', 33, "Top-level declarations cannot be d eclared to be 'factory'");
4702 static final ParserErrorCode EXTERNAL_SETTER_WITH_BODY = new ParserErrorCode.c on2('EXTERNAL_SETTER_WITH_BODY', 34, "External setters cannot have a body"); 4682 static final ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new Parse rErrorCode.con2('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 34, "Field initializers can only be used in a constructor");
4703 static final ParserErrorCode EXTERNAL_TYPEDEF = new ParserErrorCode.con2('EXTE RNAL_TYPEDEF', 35, "Type aliases cannot be declared to be 'external'"); 4683 static final ParserErrorCode FINAL_AND_VAR = new ParserErrorCode.con2('FINAL_A ND_VAR', 35, "Members cannot be declared to be both 'final' and 'var'");
4704 static final ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION = new ParserErrorCo de.con2('FACTORY_TOP_LEVEL_DECLARATION', 36, "Top-level declarations cannot be d eclared to be 'factory'"); 4684 static final ParserErrorCode FINAL_CLASS = new ParserErrorCode.con2('FINAL_CLA SS', 36, "Classes cannot be declared to be 'final'");
4705 static final ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = new Parse rErrorCode.con2('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR', 37, "Field initializers can only be used in a constructor"); 4685 static final ParserErrorCode FINAL_CONSTRUCTOR = new ParserErrorCode.con2('FIN AL_CONSTRUCTOR', 37, "A constructor cannot be declared to be 'final'");
4706 static final ParserErrorCode FINAL_AND_VAR = new ParserErrorCode.con2('FINAL_A ND_VAR', 38, "Members cannot be declared to be both 'final' and 'var'"); 4686 static final ParserErrorCode FINAL_METHOD = new ParserErrorCode.con2('FINAL_ME THOD', 38, "Getters, setters and methods cannot be declared to be 'final'");
4707 static final ParserErrorCode FINAL_CLASS = new ParserErrorCode.con2('FINAL_CLA SS', 39, "Classes cannot be declared to be 'final'"); 4687 static final ParserErrorCode FINAL_TYPEDEF = new ParserErrorCode.con2('FINAL_T YPEDEF', 39, "Type aliases cannot be declared to be 'final'");
4708 static final ParserErrorCode FINAL_CONSTRUCTOR = new ParserErrorCode.con2('FIN AL_CONSTRUCTOR', 40, "A constructor cannot be declared to be 'final'"); 4688 static final ParserErrorCode GETTER_WITH_PARAMETERS = new ParserErrorCode.con2 ('GETTER_WITH_PARAMETERS', 40, "Getter should be declared without a parameter li st");
4709 static final ParserErrorCode FINAL_METHOD = new ParserErrorCode.con2('FINAL_ME THOD', 41, "Getters, setters and methods cannot be declared to be 'final'"); 4689 static final ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE = new Parser ErrorCode.con2('ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE', 41, "Illegal assignment t o non-assignable expression");
4710 static final ParserErrorCode FINAL_TYPEDEF = new ParserErrorCode.con2('FINAL_T YPEDEF', 42, "Type aliases cannot be declared to be 'final'"); 4690 static final ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS = new ParserErrorCode.c on2('IMPLEMENTS_BEFORE_EXTENDS', 42, "The extends clause must be before the impl ements clause");
4711 static final ParserErrorCode GETTER_WITH_PARAMETERS = new ParserErrorCode.con2 ('GETTER_WITH_PARAMETERS', 43, "Getter should be declared without a parameter li st"); 4691 static final ParserErrorCode IMPLEMENTS_BEFORE_WITH = new ParserErrorCode.con2 ('IMPLEMENTS_BEFORE_WITH', 43, "The with clause must be before the implements cl ause");
4712 static final ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE = new Parser ErrorCode.con2('ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE', 44, "Illegal assignment t o non-assignable expression"); 4692 static final ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = new Parse rErrorCode.con2('IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 44, "Import directives must preceed part directives");
4713 static final ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS = new ParserErrorCode.c on2('IMPLEMENTS_BEFORE_EXTENDS', 45, "The extends clause must be before the impl ements clause"); 4693 static final ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH = new ParserErro rCode.con2('INITIALIZED_VARIABLE_IN_FOR_EACH', 45, "The loop variable in a for-e ach loop cannot be initialized");
4714 static final ParserErrorCode IMPLEMENTS_BEFORE_WITH = new ParserErrorCode.con2 ('IMPLEMENTS_BEFORE_WITH', 46, "The with clause must be before the implements cl ause"); 4694 static final ParserErrorCode INVALID_CODE_POINT = new ParserErrorCode.con2('IN VALID_CODE_POINT', 46, "The escape sequence '%s' is not a valid code point");
4715 static final ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = new Parse rErrorCode.con2('IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 47, "Import directives must preceed part directives"); 4695 static final ParserErrorCode INVALID_COMMENT_REFERENCE = new ParserErrorCode.c on2('INVALID_COMMENT_REFERENCE', 47, "Comment references should contain a possib ly prefixed identifier and can start with 'new', but should not contain anything else");
4716 static final ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH = new ParserErro rCode.con2('INITIALIZED_VARIABLE_IN_FOR_EACH', 48, "The loop variable in a for-e ach loop cannot be initialized"); 4696 static final ParserErrorCode INVALID_HEX_ESCAPE = new ParserErrorCode.con2('IN VALID_HEX_ESCAPE', 48, "An escape sequence starting with '\\x' must be followed by 2 hexidecimal digits");
4717 static final ParserErrorCode INVALID_CODE_POINT = new ParserErrorCode.con2('IN VALID_CODE_POINT', 49, "The escape sequence '%s' is not a valid code point"); 4697 static final ParserErrorCode INVALID_OPERATOR_FOR_SUPER = new ParserErrorCode. con2('INVALID_OPERATOR_FOR_SUPER', 49, "The operator '%s' cannot be used with 's uper'");
4718 static final ParserErrorCode INVALID_COMMENT_REFERENCE = new ParserErrorCode.c on2('INVALID_COMMENT_REFERENCE', 50, "Comment references should contain a possib ly prefixed identifier and can start with 'new', but should not contain anything else"); 4698 static final ParserErrorCode INVALID_UNICODE_ESCAPE = new ParserErrorCode.con2 ('INVALID_UNICODE_ESCAPE', 50, "An escape sequence starting with '\\u' must be f ollowed by 4 hexidecimal digits or from 1 to 6 digits between '{' and '}'");
4719 static final ParserErrorCode INVALID_HEX_ESCAPE = new ParserErrorCode.con2('IN VALID_HEX_ESCAPE', 51, "An escape sequence starting with '\\x' must be followed by 2 hexidecimal digits"); 4699 static final ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST = new ParserErrorCode .con2('LIBRARY_DIRECTIVE_NOT_FIRST', 51, "The library directive must appear befo re all other directives");
4720 static final ParserErrorCode INVALID_OPERATOR_FOR_SUPER = new ParserErrorCode. con2('INVALID_OPERATOR_FOR_SUPER', 52, "The operator '%s' cannot be used with 's uper'"); 4700 static final ParserErrorCode MISSING_ASSIGNABLE_SELECTOR = new ParserErrorCode .con2('MISSING_ASSIGNABLE_SELECTOR', 52, "Missing selector such as \".<identifie r>\" or \"[0]\"");
4721 static final ParserErrorCode INVALID_UNICODE_ESCAPE = new ParserErrorCode.con2 ('INVALID_UNICODE_ESCAPE', 53, "An escape sequence starting with '\\u' must be f ollowed by 4 hexidecimal digits or from 1 to 6 digits between '{' and '}'"); 4701 static final ParserErrorCode MISSING_CATCH_OR_FINALLY = new ParserErrorCode.co n2('MISSING_CATCH_OR_FINALLY', 53, "A try statement must have either a catch or finally clause");
4722 static final ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST = new ParserErrorCode .con2('LIBRARY_DIRECTIVE_NOT_FIRST', 54, "The library directive must appear befo re all other directives"); 4702 static final ParserErrorCode MISSING_CLASS_BODY = new ParserErrorCode.con2('MI SSING_CLASS_BODY', 54, "A class definition must have a body, even if it is empty ");
4723 static final ParserErrorCode MISSING_ASSIGNABLE_SELECTOR = new ParserErrorCode .con2('MISSING_ASSIGNABLE_SELECTOR', 55, "Missing selector such as \".<identifie r>\" or \"[0]\""); 4703 static final ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE = new ParserError Code.con2('MISSING_CONST_FINAL_VAR_OR_TYPE', 55, "Variables must be declared usi ng the keywords 'const', 'final', 'var' or a type name");
4724 static final ParserErrorCode MISSING_CATCH_OR_FINALLY = new ParserErrorCode.co n2('MISSING_CATCH_OR_FINALLY', 56, "A try statement must have either a catch or finally clause"); 4704 static final ParserErrorCode MISSING_FUNCTION_BODY = new ParserErrorCode.con2( 'MISSING_FUNCTION_BODY', 56, "A function body must be provided");
4725 static final ParserErrorCode MISSING_CLASS_BODY = new ParserErrorCode.con2('MI SSING_CLASS_BODY', 57, "A class definition must have a body, even if it is empty "); 4705 static final ParserErrorCode MISSING_FUNCTION_PARAMETERS = new ParserErrorCode .con2('MISSING_FUNCTION_PARAMETERS', 57, "Functions must have an explicit list o f parameters");
4726 static final ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE = new ParserError Code.con2('MISSING_CONST_FINAL_VAR_OR_TYPE', 58, "Variables must be declared usi ng the keywords 'const', 'final', 'var' or a type name"); 4706 static final ParserErrorCode MISSING_IDENTIFIER = new ParserErrorCode.con2('MI SSING_IDENTIFIER', 58, "Expected an identifier");
4727 static final ParserErrorCode MISSING_FUNCTION_BODY = new ParserErrorCode.con2( 'MISSING_FUNCTION_BODY', 59, "A function body must be provided"); 4707 static final ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = new ParserErr orCode.con2('MISSING_NAME_IN_LIBRARY_DIRECTIVE', 59, "Library directives must in clude a library name");
4728 static final ParserErrorCode MISSING_FUNCTION_PARAMETERS = new ParserErrorCode .con2('MISSING_FUNCTION_PARAMETERS', 60, "Functions must have an explicit list o f parameters"); 4708 static final ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE = new ParserErr orCode.con2('MISSING_NAME_IN_PART_OF_DIRECTIVE', 60, "Library directives must in clude a library name");
4729 static final ParserErrorCode MISSING_IDENTIFIER = new ParserErrorCode.con2('MI SSING_IDENTIFIER', 61, "Expected an identifier"); 4709 static final ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP = new Pars erErrorCode.con2('MISSING_TERMINATOR_FOR_PARAMETER_GROUP', 61, "There is no '%s' to close the parameter group");
4730 static final ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = new ParserErr orCode.con2('MISSING_NAME_IN_LIBRARY_DIRECTIVE', 62, "Library directives must in clude a library name"); 4710 static final ParserErrorCode MISSING_TYPEDEF_PARAMETERS = new ParserErrorCode. con2('MISSING_TYPEDEF_PARAMETERS', 62, "Type aliases for functions must have an explicit list of parameters");
4731 static final ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE = new ParserErr orCode.con2('MISSING_NAME_IN_PART_OF_DIRECTIVE', 63, "Library directives must in clude a library name"); 4711 static final ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = new ParserErrorCod e.con2('MISSING_VARIABLE_IN_FOR_EACH', 63, "A loop variable must be declared in a for-each loop before the 'in', but none were found");
4732 static final ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP = new Pars erErrorCode.con2('MISSING_TERMINATOR_FOR_PARAMETER_GROUP', 64, "There is no '%s' to close the parameter group"); 4712 static final ParserErrorCode MIXED_PARAMETER_GROUPS = new ParserErrorCode.con2 ('MIXED_PARAMETER_GROUPS', 64, "Cannot have both positional and named parameters in a single parameter list");
4733 static final ParserErrorCode MISSING_TYPEDEF_PARAMETERS = new ParserErrorCode. con2('MISSING_TYPEDEF_PARAMETERS', 65, "Type aliases for functions must have an explicit list of parameters"); 4713 static final ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = new ParserErrorCode.co n2('MULTIPLE_EXTENDS_CLAUSES', 65, "Each class definition can have at most one e xtends clause");
4734 static final ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = new ParserErrorCod e.con2('MISSING_VARIABLE_IN_FOR_EACH', 66, "A loop variable must be declared in a for-each loop before the 'in', but none were found"); 4714 static final ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = new ParserErrorCode .con2('MULTIPLE_IMPLEMENTS_CLAUSES', 66, "Each class definition can have at most one implements clause");
4735 static final ParserErrorCode MIXED_PARAMETER_GROUPS = new ParserErrorCode.con2 ('MIXED_PARAMETER_GROUPS', 67, "Cannot have both positional and named parameters in a single parameter list"); 4715 static final ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = new ParserErrorCode .con2('MULTIPLE_LIBRARY_DIRECTIVES', 67, "Only one library directive may be decl ared in a file");
4736 static final ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = new ParserErrorCode.co n2('MULTIPLE_EXTENDS_CLAUSES', 68, "Each class definition can have at most one e xtends clause"); 4716 static final ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = new ParserError Code.con2('MULTIPLE_NAMED_PARAMETER_GROUPS', 68, "Cannot have multiple groups of named parameters in a single parameter list");
4737 static final ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = new ParserErrorCode .con2('MULTIPLE_IMPLEMENTS_CLAUSES', 69, "Each class definition can have at most one implements clause"); 4717 static final ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = new ParserErrorCode .con2('MULTIPLE_PART_OF_DIRECTIVES', 69, "Only one part-of directive may be decl ared in a file");
4738 static final ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = new ParserErrorCode .con2('MULTIPLE_LIBRARY_DIRECTIVES', 70, "Only one library directive may be decl ared in a file"); 4718 static final ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = new Parser ErrorCode.con2('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 70, "Cannot have multiple groups of positional parameters in a single parameter list");
4739 static final ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = new ParserError Code.con2('MULTIPLE_NAMED_PARAMETER_GROUPS', 71, "Cannot have multiple groups of named parameters in a single parameter list"); 4719 static final ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = new ParserErrorC ode.con2('MULTIPLE_VARIABLES_IN_FOR_EACH', 71, "A single loop variable must be d eclared in a for-each loop before the 'in', but %s were found");
4740 static final ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = new ParserErrorCode .con2('MULTIPLE_PART_OF_DIRECTIVES', 72, "Only one part-of directive may be decl ared in a file"); 4720 static final ParserErrorCode MULTIPLE_WITH_CLAUSES = new ParserErrorCode.con2( 'MULTIPLE_WITH_CLAUSES', 72, "Each class definition can have at most one with cl ause");
4741 static final ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = new Parser ErrorCode.con2('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 73, "Cannot have multiple groups of positional parameters in a single parameter list"); 4721 static final ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = new ParserErrorCo de.con2('NAMED_PARAMETER_OUTSIDE_GROUP', 73, "Named parameters must be enclosed in curly braces ('{' and '}')");
4742 static final ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = new ParserErrorC ode.con2('MULTIPLE_VARIABLES_IN_FOR_EACH', 74, "A single loop variable must be d eclared in a for-each loop before the 'in', but %s were found"); 4722 static final ParserErrorCode NON_CONSTRUCTOR_FACTORY = new ParserErrorCode.con 2('NON_CONSTRUCTOR_FACTORY', 74, "Only constructors can be declared to be a 'fac tory'");
4743 static final ParserErrorCode MULTIPLE_WITH_CLAUSES = new ParserErrorCode.con2( 'MULTIPLE_WITH_CLAUSES', 75, "Each class definition can have at most one with cl ause"); 4723 static final ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = new ParserErrorCode .con2('NON_IDENTIFIER_LIBRARY_NAME', 75, "The name of a library must be an ident ifier");
4744 static final ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = new ParserErrorCo de.con2('NAMED_PARAMETER_OUTSIDE_GROUP', 76, "Named parameters must be enclosed in curly braces ('{' and '}')"); 4724 static final ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = new ParserErrorCo de.con2('NON_PART_OF_DIRECTIVE_IN_PART', 76, "The part-of directive must be the only directive in a part");
4745 static final ParserErrorCode NON_CONSTRUCTOR_FACTORY = new ParserErrorCode.con 2('NON_CONSTRUCTOR_FACTORY', 77, "Only constructors can be declared to be a 'fac tory'"); 4725 static final ParserErrorCode NON_USER_DEFINABLE_OPERATOR = new ParserErrorCode .con2('NON_USER_DEFINABLE_OPERATOR', 77, "The operator '%s' is not user definabl e");
4746 static final ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = new ParserErrorCode .con2('NON_IDENTIFIER_LIBRARY_NAME', 78, "The name of a library must be an ident ifier"); 4726 static final ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = new ParserError Code.con2('POSITIONAL_AFTER_NAMED_ARGUMENT', 78, "Positional arguments must occu r before named arguments");
4747 static final ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = new ParserErrorCo de.con2('NON_PART_OF_DIRECTIVE_IN_PART', 79, "The part-of directive must be the only directive in a part"); 4727 static final ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = new ParserEr rorCode.con2('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 79, "Positional parameters mu st be enclosed in square brackets ('[' and ']')");
4748 static final ParserErrorCode NON_USER_DEFINABLE_OPERATOR = new ParserErrorCode .con2('NON_USER_DEFINABLE_OPERATOR', 80, "The operator '%s' is not user definabl e"); 4728 static final ParserErrorCode STATIC_AFTER_CONST = new ParserErrorCode.con2('ST ATIC_AFTER_CONST', 80, "The modifier 'static' should be before the modifier 'con st'");
4749 static final ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = new ParserError Code.con2('POSITIONAL_AFTER_NAMED_ARGUMENT', 81, "Positional arguments must occu r before named arguments"); 4729 static final ParserErrorCode STATIC_AFTER_FINAL = new ParserErrorCode.con2('ST ATIC_AFTER_FINAL', 81, "The modifier 'static' should be before the modifier 'fin al'");
4750 static final ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = new ParserEr rorCode.con2('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 82, "Positional parameters mu st be enclosed in square brackets ('[' and ']')"); 4730 static final ParserErrorCode STATIC_AFTER_VAR = new ParserErrorCode.con2('STAT IC_AFTER_VAR', 82, "The modifier 'static' should be before the modifier 'var'");
4751 static final ParserErrorCode STATIC_AFTER_CONST = new ParserErrorCode.con2('ST ATIC_AFTER_CONST', 83, "The modifier 'static' should be before the modifier 'con st'"); 4731 static final ParserErrorCode STATIC_CONSTRUCTOR = new ParserErrorCode.con2('ST ATIC_CONSTRUCTOR', 83, "Constructors cannot be static");
4752 static final ParserErrorCode STATIC_AFTER_FINAL = new ParserErrorCode.con2('ST ATIC_AFTER_FINAL', 84, "The modifier 'static' should be before the modifier 'fin al'"); 4732 static final ParserErrorCode STATIC_OPERATOR = new ParserErrorCode.con2('STATI C_OPERATOR', 84, "Operators cannot be static");
4753 static final ParserErrorCode STATIC_AFTER_VAR = new ParserErrorCode.con2('STAT IC_AFTER_VAR', 85, "The modifier 'static' should be before the modifier 'var'"); 4733 static final ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = new ParserErrorCod e.con2('STATIC_TOP_LEVEL_DECLARATION', 85, "Top-level declarations cannot be dec lared to be 'static'");
4754 static final ParserErrorCode STATIC_CONSTRUCTOR = new ParserErrorCode.con2('ST ATIC_CONSTRUCTOR', 86, "Constructors cannot be static"); 4734 static final ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = new P arserErrorCode.con2('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 86, "There is n o '%s' to open a parameter group");
4755 static final ParserErrorCode STATIC_OPERATOR = new ParserErrorCode.con2('STATI C_OPERATOR', 87, "Operators cannot be static"); 4735 static final ParserErrorCode UNEXPECTED_TOKEN = new ParserErrorCode.con2('UNEX PECTED_TOKEN', 87, "Unexpected token '%s'");
4756 static final ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = new ParserErrorCod e.con2('STATIC_TOP_LEVEL_DECLARATION', 88, "Top-level declarations cannot be dec lared to be 'static'"); 4736 static final ParserErrorCode USE_OF_UNARY_PLUS_OPERATOR = new ParserErrorCode. con2('USE_OF_UNARY_PLUS_OPERATOR', 88, "There is no unary plus operator in Dart" );
4757 static final ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = new P arserErrorCode.con2('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 89, "There is n o '%s' to open a parameter group"); 4737 static final ParserErrorCode WITH_BEFORE_EXTENDS = new ParserErrorCode.con2('W ITH_BEFORE_EXTENDS', 89, "The extends clause must be before the with clause");
4758 static final ParserErrorCode UNEXPECTED_TOKEN = new ParserErrorCode.con2('UNEX PECTED_TOKEN', 90, "Unexpected token '%s'"); 4738 static final ParserErrorCode WITH_WITHOUT_EXTENDS = new ParserErrorCode.con2(' WITH_WITHOUT_EXTENDS', 90, "The with clause cannot be used without an extends cl ause");
4759 static final ParserErrorCode USE_OF_UNARY_PLUS_OPERATOR = new ParserErrorCode. con2('USE_OF_UNARY_PLUS_OPERATOR', 91, "There is no unary plus operator in Dart" ); 4739 static final ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = new ParserE rrorCode.con2('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 91, "The default value of a named parameter should be preceeded by ':'");
4760 static final ParserErrorCode WITH_BEFORE_EXTENDS = new ParserErrorCode.con2('W ITH_BEFORE_EXTENDS', 92, "The extends clause must be before the with clause"); 4740 static final ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = new Pa rserErrorCode.con2('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 92, "The default value of a positional parameter should be preceeded by '='");
4761 static final ParserErrorCode WITH_WITHOUT_EXTENDS = new ParserErrorCode.con2(' WITH_WITHOUT_EXTENDS', 93, "The with clause cannot be used without an extends cl ause"); 4741 static final ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = new Parser ErrorCode.con2('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 93, "Expected '%s' to clo se parameter group");
4762 static final ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = new ParserE rrorCode.con2('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 94, "The default value of a named parameter should be preceeded by ':'"); 4742 static final ParserErrorCode VAR_CLASS = new ParserErrorCode.con2('VAR_CLASS', 94, "Classes cannot be declared to be 'var'");
4763 static final ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = new Pa rserErrorCode.con2('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 95, "The default value of a positional parameter should be preceeded by '='"); 4743 static final ParserErrorCode VAR_RETURN_TYPE = new ParserErrorCode.con2('VAR_R ETURN_TYPE', 95, "The return type cannot be 'var'");
4764 static final ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = new Parser ErrorCode.con2('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 96, "Expected '%s' to clo se parameter group"); 4744 static final ParserErrorCode VAR_TYPEDEF = new ParserErrorCode.con2('VAR_TYPED EF', 96, "Type aliases cannot be declared to be 'var'");
4765 static final ParserErrorCode VAR_CLASS = new ParserErrorCode.con2('VAR_CLASS', 97, "Classes cannot be declared to be 'var'"); 4745 static final ParserErrorCode VOID_PARAMETER = new ParserErrorCode.con2('VOID_P ARAMETER', 97, "Parameters cannot have a type of 'void'");
4766 static final ParserErrorCode VAR_RETURN_TYPE = new ParserErrorCode.con2('VAR_R ETURN_TYPE', 98, "The return type cannot be 'var'"); 4746 static final ParserErrorCode VOID_VARIABLE = new ParserErrorCode.con2('VOID_VA RIABLE', 98, "Variables cannot have a type of 'void'");
4767 static final ParserErrorCode VAR_TYPEDEF = new ParserErrorCode.con2('VAR_TYPED EF', 99, "Type aliases cannot be declared to be 'var'"); 4747 static final List<ParserErrorCode> values = [ABSTRACT_CLASS_MEMBER, ABSTRACT_S TATIC_METHOD, ABSTRACT_TOP_LEVEL_FUNCTION, ABSTRACT_TOP_LEVEL_VARIABLE, ABSTRACT _TYPEDEF, BREAK_OUTSIDE_OF_LOOP, CONST_AND_FINAL, CONST_AND_VAR, CONST_CLASS, CO NST_METHOD, CONST_TYPEDEF, CONSTRUCTOR_WITH_RETURN_TYPE, CONTINUE_OUTSIDE_OF_LOO P, CONTINUE_WITHOUT_LABEL_IN_CASE, DIRECTIVE_AFTER_DECLARATION, DUPLICATE_LABEL_ IN_SWITCH_STATEMENT, DUPLICATED_MODIFIER, EXPECTED_CASE_OR_DEFAULT, EXPECTED_LIS T_OR_MAP_LITERAL, EXPECTED_STRING_LITERAL, EXPECTED_TOKEN, EXPORT_DIRECTIVE_AFTE R_PART_DIRECTIVE, EXTERNAL_AFTER_CONST, EXTERNAL_AFTER_FACTORY, EXTERNAL_AFTER_S TATIC, EXTERNAL_CLASS, EXTERNAL_CONSTRUCTOR_WITH_BODY, EXTERNAL_FIELD, EXTERNAL_ GETTER_WITH_BODY, EXTERNAL_METHOD_WITH_BODY, EXTERNAL_OPERATOR_WITH_BODY, EXTERN AL_SETTER_WITH_BODY, EXTERNAL_TYPEDEF, FACTORY_TOP_LEVEL_DECLARATION, FIELD_INIT IALIZER_OUTSIDE_CONSTRUCTOR, FINAL_AND_VAR, FINAL_CLASS, FINAL_CONSTRUCTOR, FINA L_METHOD, FINAL_TYPEDEF, GETTER_WITH_PARAMETERS, ILLEGAL_ASSIGNMENT_TO_NON_ASSIG NABLE, IMPLEMENTS_BEFORE_EXTENDS, IMPLEMENTS_BEFORE_WITH, IMPORT_DIRECTIVE_AFTER _PART_DIRECTIVE, INITIALIZED_VARIABLE_IN_FOR_EACH, INVALID_CODE_POINT, INVALID_C OMMENT_REFERENCE, INVALID_HEX_ESCAPE, INVALID_OPERATOR_FOR_SUPER, INVALID_UNICOD E_ESCAPE, LIBRARY_DIRECTIVE_NOT_FIRST, MISSING_ASSIGNABLE_SELECTOR, MISSING_CATC H_OR_FINALLY, MISSING_CLASS_BODY, MISSING_CONST_FINAL_VAR_OR_TYPE, MISSING_FUNCT ION_BODY, MISSING_FUNCTION_PARAMETERS, MISSING_IDENTIFIER, MISSING_NAME_IN_LIBRA RY_DIRECTIVE, MISSING_NAME_IN_PART_OF_DIRECTIVE, MISSING_TERMINATOR_FOR_PARAMETE R_GROUP, MISSING_TYPEDEF_PARAMETERS, MISSING_VARIABLE_IN_FOR_EACH, MIXED_PARAMET ER_GROUPS, MULTIPLE_EXTENDS_CLAUSES, MULTIPLE_IMPLEMENTS_CLAUSES, MULTIPLE_LIBRA RY_DIRECTIVES, MULTIPLE_NAMED_PARAMETER_GROUPS, MULTIPLE_PART_OF_DIRECTIVES, MUL TIPLE_POSITIONAL_PARAMETER_GROUPS, MULTIPLE_VARIABLES_IN_FOR_EACH, MULTIPLE_WITH _CLAUSES, NAMED_PARAMETER_OUTSIDE_GROUP, NON_CONSTRUCTOR_FACTORY, NON_IDENTIFIER _LIBRARY_NAME, NON_PART_OF_DIRECTIVE_IN_PART, NON_USER_DEFINABLE_OPERATOR, POSIT IONAL_AFTER_NAMED_ARGUMENT, POSITIONAL_PARAMETER_OUTSIDE_GROUP, STATIC_AFTER_CON ST, STATIC_AFTER_FINAL, STATIC_AFTER_VAR, STATIC_CONSTRUCTOR, STATIC_OPERATOR, S TATIC_TOP_LEVEL_DECLARATION, UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, UNEXPECT ED_TOKEN, USE_OF_UNARY_PLUS_OPERATOR, WITH_BEFORE_EXTENDS, WITH_WITHOUT_EXTENDS, WRONG_SEPARATOR_FOR_NAMED_PARAMETER, WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER, WRONG_TERMINATOR_FOR_PARAMETER_GROUP, VAR_CLASS, VAR_RETURN_TYPE, VAR_TYPEDEF, V OID_PARAMETER, VOID_VARIABLE];
4768 static final ParserErrorCode VOID_PARAMETER = new ParserErrorCode.con2('VOID_P ARAMETER', 100, "Parameters cannot have a type of 'void'");
4769 static final ParserErrorCode VOID_VARIABLE = new ParserErrorCode.con2('VOID_VA RIABLE', 101, "Variables cannot have a type of 'void'");
4770 static final List<ParserErrorCode> values = [ABSTRACT_CLASS_MEMBER, ABSTRACT_S TATIC_METHOD, ABSTRACT_TOP_LEVEL_FUNCTION, ABSTRACT_TOP_LEVEL_VARIABLE, ABSTRACT _TYPEDEF, BREAK_OUTSIDE_OF_LOOP, BUILT_IN_IDENTIFIER_AS_TYPE_NAME, BUILT_IN_IDEN TIFIER_AS_TYPEDEF_NAME, BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME, CONST_AND_FIN AL, CONST_AND_VAR, CONST_CLASS, CONST_METHOD, CONST_TYPEDEF, CONSTRUCTOR_WITH_RE TURN_TYPE, CONTINUE_OUTSIDE_OF_LOOP, CONTINUE_WITHOUT_LABEL_IN_CASE, DIRECTIVE_A FTER_DECLARATION, DUPLICATE_LABEL_IN_SWITCH_STATEMENT, DUPLICATED_MODIFIER, EXPE CTED_CASE_OR_DEFAULT, EXPECTED_LIST_OR_MAP_LITERAL, EXPECTED_STRING_LITERAL, EXP ECTED_TOKEN, EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, EXTERNAL_AFTER_CONST, EXTERN AL_AFTER_FACTORY, EXTERNAL_AFTER_STATIC, EXTERNAL_CLASS, EXTERNAL_CONSTRUCTOR_WI TH_BODY, EXTERNAL_FIELD, EXTERNAL_GETTER_WITH_BODY, EXTERNAL_METHOD_WITH_BODY, E XTERNAL_OPERATOR_WITH_BODY, EXTERNAL_SETTER_WITH_BODY, EXTERNAL_TYPEDEF, FACTORY _TOP_LEVEL_DECLARATION, FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, FINAL_AND_VAR, FI NAL_CLASS, FINAL_CONSTRUCTOR, FINAL_METHOD, FINAL_TYPEDEF, GETTER_WITH_PARAMETER S, ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, IMPLEMENTS_BEFORE_EXTENDS, IMPLEMENTS_B EFORE_WITH, IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, INITIALIZED_VARIABLE_IN_FOR_E ACH, INVALID_CODE_POINT, INVALID_COMMENT_REFERENCE, INVALID_HEX_ESCAPE, INVALID_ OPERATOR_FOR_SUPER, INVALID_UNICODE_ESCAPE, LIBRARY_DIRECTIVE_NOT_FIRST, MISSING _ASSIGNABLE_SELECTOR, MISSING_CATCH_OR_FINALLY, MISSING_CLASS_BODY, MISSING_CONS T_FINAL_VAR_OR_TYPE, MISSING_FUNCTION_BODY, MISSING_FUNCTION_PARAMETERS, MISSING _IDENTIFIER, MISSING_NAME_IN_LIBRARY_DIRECTIVE, MISSING_NAME_IN_PART_OF_DIRECTIV E, MISSING_TERMINATOR_FOR_PARAMETER_GROUP, MISSING_TYPEDEF_PARAMETERS, MISSING_V ARIABLE_IN_FOR_EACH, MIXED_PARAMETER_GROUPS, MULTIPLE_EXTENDS_CLAUSES, MULTIPLE_ IMPLEMENTS_CLAUSES, MULTIPLE_LIBRARY_DIRECTIVES, MULTIPLE_NAMED_PARAMETER_GROUPS , MULTIPLE_PART_OF_DIRECTIVES, MULTIPLE_POSITIONAL_PARAMETER_GROUPS, MULTIPLE_VA RIABLES_IN_FOR_EACH, MULTIPLE_WITH_CLAUSES, NAMED_PARAMETER_OUTSIDE_GROUP, NON_C ONSTRUCTOR_FACTORY, NON_IDENTIFIER_LIBRARY_NAME, NON_PART_OF_DIRECTIVE_IN_PART, NON_USER_DEFINABLE_OPERATOR, POSITIONAL_AFTER_NAMED_ARGUMENT, POSITIONAL_PARAMET ER_OUTSIDE_GROUP, STATIC_AFTER_CONST, STATIC_AFTER_FINAL, STATIC_AFTER_VAR, STAT IC_CONSTRUCTOR, STATIC_OPERATOR, STATIC_TOP_LEVEL_DECLARATION, UNEXPECTED_TERMIN ATOR_FOR_PARAMETER_GROUP, UNEXPECTED_TOKEN, USE_OF_UNARY_PLUS_OPERATOR, WITH_BEF ORE_EXTENDS, WITH_WITHOUT_EXTENDS, WRONG_SEPARATOR_FOR_NAMED_PARAMETER, WRONG_SE PARATOR_FOR_POSITIONAL_PARAMETER, WRONG_TERMINATOR_FOR_PARAMETER_GROUP, VAR_CLAS S, VAR_RETURN_TYPE, VAR_TYPEDEF, VOID_PARAMETER, VOID_VARIABLE];
4771 String __name; 4748 String __name;
4772 int __ordinal = 0; 4749 int __ordinal = 0;
4773 /** 4750 /**
4774 * The severity of this error. 4751 * The severity of this error.
4775 */ 4752 */
4776 ErrorSeverity _severity; 4753 ErrorSeverity _severity;
4777 /** 4754 /**
4778 * The message template used to create the message to be displayed for this er ror. 4755 * The message template used to create the message to be displayed for this er ror.
4779 */ 4756 */
4780 String _message; 4757 String _message;
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
5668 for (int i = 0; i < size10; i++) { 5645 for (int i = 0; i < size10; i++) {
5669 if (i > 0) { 5646 if (i > 0) {
5670 _writer.print(separator); 5647 _writer.print(separator);
5671 } 5648 }
5672 nodes[i].accept(this); 5649 nodes[i].accept(this);
5673 } 5650 }
5674 } 5651 }
5675 } 5652 }
5676 } 5653 }
5677 } 5654 }
OLDNEW
« no previous file with comments | « pkg/analyzer-experimental/lib/src/generated/java_core.dart ('k') | pkg/analyzer-experimental/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698