| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine.parser; | 3 library engine.parser; |
| 4 import 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
| 6 import 'java_engine.dart'; | |
| 7 import 'instrumentation.dart'; | 6 import 'instrumentation.dart'; |
| 8 import 'error.dart'; | 7 import 'error.dart'; |
| 9 import 'source.dart'; | 8 import 'source.dart'; |
| 10 import 'scanner.dart'; | 9 import 'scanner.dart'; |
| 11 import 'ast.dart'; | 10 import 'ast.dart'; |
| 12 import 'utilities_dart.dart'; | 11 import 'utilities_dart.dart'; |
| 12 import 'engine.dart' show AnalysisEngine; |
| 13 /** | 13 /** |
| 14 * Instances of the class `CommentAndMetadata` implement a simple data-holder fo
r a method | 14 * Instances of the class `CommentAndMetadata` implement a simple data-holder fo
r a method |
| 15 * that needs to return multiple values. | 15 * that needs to return multiple values. |
| 16 * | 16 * |
| 17 * @coverage dart.engine.parser | 17 * @coverage dart.engine.parser |
| 18 */ | 18 */ |
| 19 class CommentAndMetadata { | 19 class CommentAndMetadata { |
| 20 | 20 |
| 21 /** | 21 /** |
| 22 * The documentation comment that was parsed, or `null` if none was given. | 22 * The documentation comment that was parsed, or `null` if none was given. |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 builder.appendChar((scalarValue as int)); | 434 builder.appendChar((scalarValue as int)); |
| 435 } else { | 435 } else { |
| 436 builder.append(Character.toChars(scalarValue)); | 436 builder.append(Character.toChars(scalarValue)); |
| 437 } | 437 } |
| 438 } | 438 } |
| 439 | 439 |
| 440 /** | 440 /** |
| 441 * Compute the content of a string with the given literal representation. | 441 * Compute the content of a string with the given literal representation. |
| 442 * | 442 * |
| 443 * @param lexeme the literal representation of the string | 443 * @param lexeme the literal representation of the string |
| 444 * @param first `true` if this is the first token in a string literal |
| 445 * @param last `true` if this is the last token in a string literal |
| 444 * @return the actual value of the string | 446 * @return the actual value of the string |
| 445 */ | 447 */ |
| 446 String computeStringValue(String lexeme) { | 448 String computeStringValue(String lexeme, bool first, bool last) { |
| 447 if (lexeme.startsWith("r\"\"\"") || lexeme.startsWith("r'''")) { | 449 bool isRaw = false; |
| 448 if (lexeme.length > 4) { | 450 int start = 0; |
| 449 return lexeme.substring(4, lexeme.length - 3); | 451 if (first) { |
| 450 } | 452 if (lexeme.startsWith("r\"\"\"") || lexeme.startsWith("r'''")) { |
| 451 } else if (lexeme.startsWith("r\"") || lexeme.startsWith("r'")) { | 453 isRaw = true; |
| 452 if (lexeme.length > 2) { | 454 start += 4; |
| 453 return lexeme.substring(2, lexeme.length - 1); | 455 } else if (lexeme.startsWith("r\"") || lexeme.startsWith("r'")) { |
| 456 isRaw = true; |
| 457 start += 2; |
| 458 } else if (lexeme.startsWith("\"\"\"") || lexeme.startsWith("'''")) { |
| 459 start += 3; |
| 460 } else if (lexeme.startsWith("\"") || lexeme.startsWith("'")) { |
| 461 start += 1; |
| 454 } | 462 } |
| 455 } | 463 } |
| 456 int start = 0; | 464 int end = lexeme.length; |
| 457 if (lexeme.startsWith("\"\"\"") || lexeme.startsWith("'''")) { | 465 if (last) { |
| 458 start += 3; | 466 if (lexeme.endsWith("\"\"\"") || lexeme.endsWith("'''")) { |
| 459 } else if (lexeme.startsWith("\"") || lexeme.startsWith("'")) { | 467 end -= 3; |
| 460 start += 1; | 468 } else if (lexeme.endsWith("\"") || lexeme.endsWith("'")) { |
| 469 end -= 1; |
| 470 } |
| 461 } | 471 } |
| 462 int end = lexeme.length; | 472 if (end - start + 1 < 0) { |
| 463 if (end > 3 && (lexeme.endsWith("\"\"\"") || lexeme.endsWith("'''"))) { | 473 AnalysisEngine.instance.logger.logError("Internal error: computeStringValu
e(${lexeme}, ${first}, ${last})"); |
| 464 end -= 3; | 474 return ""; |
| 465 } else if (end > 1 && (lexeme.endsWith("\"") || lexeme.endsWith("'"))) { | 475 } |
| 466 end -= 1; | 476 if (isRaw) { |
| 477 return lexeme.substring(start, end); |
| 467 } | 478 } |
| 468 JavaStringBuilder builder = new JavaStringBuilder(); | 479 JavaStringBuilder builder = new JavaStringBuilder(); |
| 469 int index = start; | 480 int index = start; |
| 470 while (index < end) { | 481 while (index < end) { |
| 471 index = translateCharacter(builder, lexeme, index); | 482 index = translateCharacter(builder, lexeme, index); |
| 472 } | 483 } |
| 473 return builder.toString(); | 484 return builder.toString(); |
| 474 } | 485 } |
| 475 | 486 |
| 476 /** | 487 /** |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 * | 536 * |
| 526 * @return the synthetic string literal that was created | 537 * @return the synthetic string literal that was created |
| 527 */ | 538 */ |
| 528 SimpleStringLiteral createSyntheticStringLiteral() => new SimpleStringLiteral.
full(createSyntheticToken2(TokenType.STRING), ""); | 539 SimpleStringLiteral createSyntheticStringLiteral() => new SimpleStringLiteral.
full(createSyntheticToken2(TokenType.STRING), ""); |
| 529 | 540 |
| 530 /** | 541 /** |
| 531 * Create a synthetic token representing the given keyword. | 542 * Create a synthetic token representing the given keyword. |
| 532 * | 543 * |
| 533 * @return the synthetic token that was created | 544 * @return the synthetic token that was created |
| 534 */ | 545 */ |
| 535 Token createSyntheticToken(Keyword keyword) => new KeywordToken_11(keyword, _c
urrentToken.offset); | 546 Token createSyntheticToken(Keyword keyword) => new KeywordToken_12(keyword, _c
urrentToken.offset); |
| 536 | 547 |
| 537 /** | 548 /** |
| 538 * Create a synthetic token with the given type. | 549 * Create a synthetic token with the given type. |
| 539 * | 550 * |
| 540 * @return the synthetic token that was created | 551 * @return the synthetic token that was created |
| 541 */ | 552 */ |
| 542 Token createSyntheticToken2(TokenType type) => new StringToken(type, "", _curr
entToken.offset); | 553 Token createSyntheticToken2(TokenType type) => new StringToken(type, "", _curr
entToken.offset); |
| 543 | 554 |
| 544 /** | 555 /** |
| 545 * Check that the given expression is assignable and report an error if it isn
't. | 556 * Check that the given expression is assignable and report an error if it isn
't. |
| (...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1812 * comment | 1823 * comment |
| 1813 * @param sourceOffset the offset of the first character of the reference sour
ce | 1824 * @param sourceOffset the offset of the first character of the reference sour
ce |
| 1814 * @return the comment reference that was parsed, or `null` if no reference co
uld be found | 1825 * @return the comment reference that was parsed, or `null` if no reference co
uld be found |
| 1815 */ | 1826 */ |
| 1816 CommentReference parseCommentReference(String referenceSource, int sourceOffse
t) { | 1827 CommentReference parseCommentReference(String referenceSource, int sourceOffse
t) { |
| 1817 if (referenceSource.length == 0) { | 1828 if (referenceSource.length == 0) { |
| 1818 return null; | 1829 return null; |
| 1819 } | 1830 } |
| 1820 try { | 1831 try { |
| 1821 List<bool> errorFound = [false]; | 1832 List<bool> errorFound = [false]; |
| 1822 AnalysisErrorListener listener = new AnalysisErrorListener_12(errorFound); | 1833 AnalysisErrorListener listener = new AnalysisErrorListener_13(errorFound); |
| 1823 StringScanner scanner = new StringScanner(null, referenceSource, listener)
; | 1834 StringScanner scanner = new StringScanner(null, referenceSource, listener)
; |
| 1824 scanner.setSourceStart(1, 1, sourceOffset); | 1835 scanner.setSourceStart(1, 1, sourceOffset); |
| 1825 Token firstToken = scanner.tokenize(); | 1836 Token firstToken = scanner.tokenize(); |
| 1826 if (errorFound[0]) { | 1837 if (errorFound[0]) { |
| 1827 return null; | 1838 return null; |
| 1828 } | 1839 } |
| 1829 Token newKeyword = null; | 1840 Token newKeyword = null; |
| 1830 if (matches3(firstToken, Keyword.NEW)) { | 1841 if (matches3(firstToken, Keyword.NEW)) { |
| 1831 newKeyword = firstToken; | 1842 newKeyword = firstToken; |
| 1832 firstToken = firstToken.next; | 1843 firstToken = firstToken.next; |
| (...skipping 2419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4252 return statements; | 4263 return statements; |
| 4253 } | 4264 } |
| 4254 | 4265 |
| 4255 /** | 4266 /** |
| 4256 * Parse a string literal that contains interpolations. | 4267 * Parse a string literal that contains interpolations. |
| 4257 * | 4268 * |
| 4258 * @return the string literal that was parsed | 4269 * @return the string literal that was parsed |
| 4259 */ | 4270 */ |
| 4260 StringInterpolation parseStringInterpolation(Token string) { | 4271 StringInterpolation parseStringInterpolation(Token string) { |
| 4261 List<InterpolationElement> elements = new List<InterpolationElement>(); | 4272 List<InterpolationElement> elements = new List<InterpolationElement>(); |
| 4262 elements.add(new InterpolationString.full(string, computeStringValue(string.
lexeme))); | 4273 bool hasMore = matches5(TokenType.STRING_INTERPOLATION_EXPRESSION) || matche
s5(TokenType.STRING_INTERPOLATION_IDENTIFIER); |
| 4263 while (matches5(TokenType.STRING_INTERPOLATION_EXPRESSION) || matches5(Token
Type.STRING_INTERPOLATION_IDENTIFIER)) { | 4274 elements.add(new InterpolationString.full(string, computeStringValue(string.
lexeme, true, !hasMore))); |
| 4275 while (hasMore) { |
| 4264 if (matches5(TokenType.STRING_INTERPOLATION_EXPRESSION)) { | 4276 if (matches5(TokenType.STRING_INTERPOLATION_EXPRESSION)) { |
| 4265 Token openToken = andAdvance; | 4277 Token openToken = andAdvance; |
| 4266 Expression expression = parseExpression2(); | 4278 Expression expression = parseExpression2(); |
| 4267 Token rightBracket = expect2(TokenType.CLOSE_CURLY_BRACKET); | 4279 Token rightBracket = expect2(TokenType.CLOSE_CURLY_BRACKET); |
| 4268 elements.add(new InterpolationExpression.full(openToken, expression, rig
htBracket)); | 4280 elements.add(new InterpolationExpression.full(openToken, expression, rig
htBracket)); |
| 4269 } else { | 4281 } else { |
| 4270 Token openToken = andAdvance; | 4282 Token openToken = andAdvance; |
| 4271 Expression expression = null; | 4283 Expression expression = null; |
| 4272 if (matches(Keyword.THIS)) { | 4284 if (matches(Keyword.THIS)) { |
| 4273 expression = new ThisExpression.full(andAdvance); | 4285 expression = new ThisExpression.full(andAdvance); |
| 4274 } else { | 4286 } else { |
| 4275 expression = parseSimpleIdentifier(); | 4287 expression = parseSimpleIdentifier(); |
| 4276 } | 4288 } |
| 4277 elements.add(new InterpolationExpression.full(openToken, expression, nul
l)); | 4289 elements.add(new InterpolationExpression.full(openToken, expression, nul
l)); |
| 4278 } | 4290 } |
| 4279 if (matches5(TokenType.STRING)) { | 4291 if (matches5(TokenType.STRING)) { |
| 4280 string = andAdvance; | 4292 string = andAdvance; |
| 4281 elements.add(new InterpolationString.full(string, computeStringValue(str
ing.lexeme))); | 4293 hasMore = matches5(TokenType.STRING_INTERPOLATION_EXPRESSION) || matches
5(TokenType.STRING_INTERPOLATION_IDENTIFIER); |
| 4294 elements.add(new InterpolationString.full(string, computeStringValue(str
ing.lexeme, false, !hasMore))); |
| 4282 } | 4295 } |
| 4283 } | 4296 } |
| 4284 return new StringInterpolation.full(elements); | 4297 return new StringInterpolation.full(elements); |
| 4285 } | 4298 } |
| 4286 | 4299 |
| 4287 /** | 4300 /** |
| 4288 * Parse a string literal. | 4301 * Parse a string literal. |
| 4289 * | 4302 * |
| 4290 * <pre> | 4303 * <pre> |
| 4291 * stringLiteral ::= | 4304 * stringLiteral ::= |
| 4292 * MULTI_LINE_STRING+ | 4305 * MULTI_LINE_STRING+ |
| 4293 * | SINGLE_LINE_STRING+ | 4306 * | SINGLE_LINE_STRING+ |
| 4294 * </pre> | 4307 * </pre> |
| 4295 * | 4308 * |
| 4296 * @return the string literal that was parsed | 4309 * @return the string literal that was parsed |
| 4297 */ | 4310 */ |
| 4298 StringLiteral parseStringLiteral() { | 4311 StringLiteral parseStringLiteral() { |
| 4299 List<StringLiteral> strings = new List<StringLiteral>(); | 4312 List<StringLiteral> strings = new List<StringLiteral>(); |
| 4300 while (matches5(TokenType.STRING)) { | 4313 while (matches5(TokenType.STRING)) { |
| 4301 Token string = andAdvance; | 4314 Token string = andAdvance; |
| 4302 if (matches5(TokenType.STRING_INTERPOLATION_EXPRESSION) || matches5(TokenT
ype.STRING_INTERPOLATION_IDENTIFIER)) { | 4315 if (matches5(TokenType.STRING_INTERPOLATION_EXPRESSION) || matches5(TokenT
ype.STRING_INTERPOLATION_IDENTIFIER)) { |
| 4303 strings.add(parseStringInterpolation(string)); | 4316 strings.add(parseStringInterpolation(string)); |
| 4304 } else { | 4317 } else { |
| 4305 strings.add(new SimpleStringLiteral.full(string, computeStringValue(stri
ng.lexeme))); | 4318 strings.add(new SimpleStringLiteral.full(string, computeStringValue(stri
ng.lexeme, true, true))); |
| 4306 } | 4319 } |
| 4307 } | 4320 } |
| 4308 if (strings.length < 1) { | 4321 if (strings.length < 1) { |
| 4309 reportError7(ParserErrorCode.EXPECTED_STRING_LITERAL, []); | 4322 reportError7(ParserErrorCode.EXPECTED_STRING_LITERAL, []); |
| 4310 return createSyntheticStringLiteral(); | 4323 return createSyntheticStringLiteral(); |
| 4311 } else if (strings.length == 1) { | 4324 } else if (strings.length == 1) { |
| 4312 return strings[0]; | 4325 return strings[0]; |
| 4313 } else { | 4326 } else { |
| 4314 return new AdjacentStrings.full(strings); | 4327 return new AdjacentStrings.full(strings); |
| 4315 } | 4328 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4412 * | 4425 * |
| 4413 * <pre> | 4426 * <pre> |
| 4414 * symbolLiteral ::= | 4427 * symbolLiteral ::= |
| 4415 * '#' identifier ('.' identifier)* | 4428 * '#' identifier ('.' identifier)* |
| 4416 * </pre> | 4429 * </pre> |
| 4417 * | 4430 * |
| 4418 * @return the symbol literal that was parsed | 4431 * @return the symbol literal that was parsed |
| 4419 */ | 4432 */ |
| 4420 SymbolLiteral parseSymbolLiteral() { | 4433 SymbolLiteral parseSymbolLiteral() { |
| 4421 Token poundSign = andAdvance; | 4434 Token poundSign = andAdvance; |
| 4422 List<SimpleIdentifier> components = new List<SimpleIdentifier>(); | 4435 List<Token> components = new List<Token>(); |
| 4423 if (matches5(TokenType.IDENTIFIER)) { | 4436 if (matches5(TokenType.IDENTIFIER)) { |
| 4424 components.add(parseSimpleIdentifier()); | 4437 components.add(andAdvance); |
| 4425 while (matches5(TokenType.PERIOD)) { | 4438 while (matches5(TokenType.PERIOD)) { |
| 4426 advance(); | 4439 advance(); |
| 4427 if (matches5(TokenType.IDENTIFIER)) { | 4440 if (matches5(TokenType.IDENTIFIER)) { |
| 4428 components.add(parseSimpleIdentifier()); | 4441 components.add(andAdvance); |
| 4429 } else { | 4442 } else { |
| 4430 reportError7(ParserErrorCode.MISSING_IDENTIFIER, []); | 4443 reportError7(ParserErrorCode.MISSING_IDENTIFIER, []); |
| 4431 components.add(createSyntheticIdentifier()); | 4444 components.add(createSyntheticToken2(TokenType.IDENTIFIER)); |
| 4432 break; | 4445 break; |
| 4433 } | 4446 } |
| 4434 } | 4447 } |
| 4448 } else if (_currentToken.isOperator) { |
| 4449 components.add(andAdvance); |
| 4435 } else { | 4450 } else { |
| 4436 reportError7(ParserErrorCode.MISSING_IDENTIFIER, []); | 4451 reportError7(ParserErrorCode.MISSING_IDENTIFIER, []); |
| 4437 components.add(createSyntheticIdentifier()); | 4452 components.add(createSyntheticToken2(TokenType.IDENTIFIER)); |
| 4438 } | 4453 } |
| 4439 return new SymbolLiteral.full(poundSign, components); | 4454 return new SymbolLiteral.full(poundSign, new List.from(components)); |
| 4440 } | 4455 } |
| 4441 | 4456 |
| 4442 /** | 4457 /** |
| 4443 * Parse a throw expression. | 4458 * Parse a throw expression. |
| 4444 * | 4459 * |
| 4445 * <pre> | 4460 * <pre> |
| 4446 * throwExpression ::= | 4461 * throwExpression ::= |
| 4447 * 'throw' expression | 4462 * 'throw' expression |
| 4448 * </pre> | 4463 * </pre> |
| 4449 * | 4464 * |
| (...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5704 reportError8(ParserErrorCode.EXTERNAL_TYPEDEF, modifiers.externalKeyword,
[]); | 5719 reportError8(ParserErrorCode.EXTERNAL_TYPEDEF, modifiers.externalKeyword,
[]); |
| 5705 } | 5720 } |
| 5706 if (modifiers.finalKeyword != null) { | 5721 if (modifiers.finalKeyword != null) { |
| 5707 reportError8(ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword, []); | 5722 reportError8(ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword, []); |
| 5708 } | 5723 } |
| 5709 if (modifiers.varKeyword != null) { | 5724 if (modifiers.varKeyword != null) { |
| 5710 reportError8(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword, []); | 5725 reportError8(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword, []); |
| 5711 } | 5726 } |
| 5712 } | 5727 } |
| 5713 } | 5728 } |
| 5714 class KeywordToken_11 extends KeywordToken { | 5729 class KeywordToken_12 extends KeywordToken { |
| 5715 KeywordToken_11(Keyword arg0, int arg1) : super(arg0, arg1); | 5730 KeywordToken_12(Keyword arg0, int arg1) : super(arg0, arg1); |
| 5716 int get length => 0; | 5731 int get length => 0; |
| 5717 } | 5732 } |
| 5718 class AnalysisErrorListener_12 implements AnalysisErrorListener { | 5733 class AnalysisErrorListener_13 implements AnalysisErrorListener { |
| 5719 List<bool> errorFound; | 5734 List<bool> errorFound; |
| 5720 AnalysisErrorListener_12(this.errorFound); | 5735 AnalysisErrorListener_13(this.errorFound); |
| 5721 void onError(AnalysisError error) { | 5736 void onError(AnalysisError error) { |
| 5722 errorFound[0] = true; | 5737 errorFound[0] = true; |
| 5723 } | 5738 } |
| 5724 } | 5739 } |
| 5725 /** | 5740 /** |
| 5726 * The enumeration `ParserErrorCode` defines the error codes used for errors det
ected by the | 5741 * The enumeration `ParserErrorCode` defines the error codes used for errors det
ected by the |
| 5727 * parser. The convention for this class is for the name of the error code to in
dicate the problem | 5742 * parser. The convention for this class is for the name of the error code to in
dicate the problem |
| 5728 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 5743 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
| 5729 * when appropriate, how the problem can be corrected. | 5744 * when appropriate, how the problem can be corrected. |
| 5730 * | 5745 * |
| 5731 * @coverage dart.engine.parser | 5746 * @coverage dart.engine.parser |
| 5732 */ | 5747 */ |
| 5733 class ParserErrorCode implements Comparable<ParserErrorCode>, ErrorCode { | 5748 class ParserErrorCode implements Enum<ParserErrorCode>, ErrorCode { |
| 5734 static final ParserErrorCode ABSTRACT_CLASS_MEMBER = new ParserErrorCode.con2(
'ABSTRACT_CLASS_MEMBER', 0, "Members of classes cannot be declared to be 'abstra
ct'"); | 5749 static final ParserErrorCode ABSTRACT_CLASS_MEMBER = new ParserErrorCode.con2(
'ABSTRACT_CLASS_MEMBER', 0, "Members of classes cannot be declared to be 'abstra
ct'"); |
| 5735 static final ParserErrorCode ABSTRACT_STATIC_METHOD = new ParserErrorCode.con2
('ABSTRACT_STATIC_METHOD', 1, "Static methods cannot be declared to be 'abstract
'"); | 5750 static final ParserErrorCode ABSTRACT_STATIC_METHOD = new ParserErrorCode.con2
('ABSTRACT_STATIC_METHOD', 1, "Static methods cannot be declared to be 'abstract
'"); |
| 5736 static final ParserErrorCode ABSTRACT_TOP_LEVEL_FUNCTION = new ParserErrorCode
.con2('ABSTRACT_TOP_LEVEL_FUNCTION', 2, "Top-level functions cannot be declared
to be 'abstract'"); | 5751 static final ParserErrorCode ABSTRACT_TOP_LEVEL_FUNCTION = new ParserErrorCode
.con2('ABSTRACT_TOP_LEVEL_FUNCTION', 2, "Top-level functions cannot be declared
to be 'abstract'"); |
| 5737 static final ParserErrorCode ABSTRACT_TOP_LEVEL_VARIABLE = new ParserErrorCode
.con2('ABSTRACT_TOP_LEVEL_VARIABLE', 3, "Top-level variables cannot be declared
to be 'abstract'"); | 5752 static final ParserErrorCode ABSTRACT_TOP_LEVEL_VARIABLE = new ParserErrorCode
.con2('ABSTRACT_TOP_LEVEL_VARIABLE', 3, "Top-level variables cannot be declared
to be 'abstract'"); |
| 5738 static final ParserErrorCode ABSTRACT_TYPEDEF = new ParserErrorCode.con2('ABST
RACT_TYPEDEF', 4, "Type aliases cannot be declared to be 'abstract'"); | 5753 static final ParserErrorCode ABSTRACT_TYPEDEF = new ParserErrorCode.con2('ABST
RACT_TYPEDEF', 4, "Type aliases cannot be declared to be 'abstract'"); |
| 5739 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"); | 5754 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"); |
| 5740 static final ParserErrorCode CONST_AND_FINAL = new ParserErrorCode.con2('CONST
_AND_FINAL', 6, "Members cannot be declared to be both 'const' and 'final'"); | 5755 static final ParserErrorCode CONST_AND_FINAL = new ParserErrorCode.con2('CONST
_AND_FINAL', 6, "Members cannot be declared to be both 'const' and 'final'"); |
| 5741 static final ParserErrorCode CONST_AND_VAR = new ParserErrorCode.con2('CONST_A
ND_VAR', 7, "Members cannot be declared to be both 'const' and 'var'"); | 5756 static final ParserErrorCode CONST_AND_VAR = new ParserErrorCode.con2('CONST_A
ND_VAR', 7, "Members cannot be declared to be both 'const' and 'var'"); |
| 5742 static final ParserErrorCode CONST_CLASS = new ParserErrorCode.con2('CONST_CLA
SS', 8, "Classes cannot be declared to be 'const'"); | 5757 static final ParserErrorCode CONST_CLASS = new ParserErrorCode.con2('CONST_CLA
SS', 8, "Classes cannot be declared to be 'const'"); |
| 5743 static final ParserErrorCode CONST_CONSTRUCTOR_WITH_BODY = new ParserErrorCode
.con2('CONST_CONSTRUCTOR_WITH_BODY', 9, "'const' constructors cannot have a body
"); | 5758 static final ParserErrorCode CONST_CONSTRUCTOR_WITH_BODY = new ParserErrorCode
.con2('CONST_CONSTRUCTOR_WITH_BODY', 9, "'const' constructors cannot have a body
"); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5816 static final ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = new ParserErrorCode.co
n2('MULTIPLE_EXTENDS_CLAUSES', 82, "Each class definition can have at most one e
xtends clause"); | 5831 static final ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = new ParserErrorCode.co
n2('MULTIPLE_EXTENDS_CLAUSES', 82, "Each class definition can have at most one e
xtends clause"); |
| 5817 static final ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = new ParserErrorCode
.con2('MULTIPLE_IMPLEMENTS_CLAUSES', 83, "Each class definition can have at most
one implements clause"); | 5832 static final ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = new ParserErrorCode
.con2('MULTIPLE_IMPLEMENTS_CLAUSES', 83, "Each class definition can have at most
one implements clause"); |
| 5818 static final ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = new ParserErrorCode
.con2('MULTIPLE_LIBRARY_DIRECTIVES', 84, "Only one library directive may be decl
ared in a file"); | 5833 static final ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = new ParserErrorCode
.con2('MULTIPLE_LIBRARY_DIRECTIVES', 84, "Only one library directive may be decl
ared in a file"); |
| 5819 static final ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = new ParserError
Code.con2('MULTIPLE_NAMED_PARAMETER_GROUPS', 85, "Cannot have multiple groups of
named parameters in a single parameter list"); | 5834 static final ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = new ParserError
Code.con2('MULTIPLE_NAMED_PARAMETER_GROUPS', 85, "Cannot have multiple groups of
named parameters in a single parameter list"); |
| 5820 static final ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = new ParserErrorCode
.con2('MULTIPLE_PART_OF_DIRECTIVES', 86, "Only one part-of directive may be decl
ared in a file"); | 5835 static final ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = new ParserErrorCode
.con2('MULTIPLE_PART_OF_DIRECTIVES', 86, "Only one part-of directive may be decl
ared in a file"); |
| 5821 static final ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = new Parser
ErrorCode.con2('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 87, "Cannot have multiple
groups of positional parameters in a single parameter list"); | 5836 static final ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = new Parser
ErrorCode.con2('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 87, "Cannot have multiple
groups of positional parameters in a single parameter list"); |
| 5822 static final ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = new ParserErrorC
ode.con2('MULTIPLE_VARIABLES_IN_FOR_EACH', 88, "A single loop variable must be d
eclared in a for-each loop before the 'in', but %s were found"); | 5837 static final ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = new ParserErrorC
ode.con2('MULTIPLE_VARIABLES_IN_FOR_EACH', 88, "A single loop variable must be d
eclared in a for-each loop before the 'in', but %s were found"); |
| 5823 static final ParserErrorCode MULTIPLE_WITH_CLAUSES = new ParserErrorCode.con2(
'MULTIPLE_WITH_CLAUSES', 89, "Each class definition can have at most one with cl
ause"); | 5838 static final ParserErrorCode MULTIPLE_WITH_CLAUSES = new ParserErrorCode.con2(
'MULTIPLE_WITH_CLAUSES', 89, "Each class definition can have at most one with cl
ause"); |
| 5824 static final ParserErrorCode NAMED_FUNCTION_EXPRESSION = new ParserErrorCode.c
on2('NAMED_FUNCTION_EXPRESSION', 90, "Function expressions cannot be named"); | 5839 static final ParserErrorCode NAMED_FUNCTION_EXPRESSION = new ParserErrorCode.c
on2('NAMED_FUNCTION_EXPRESSION', 90, "Function expressions cannot be named"); |
| 5825 static final ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = new ParserErrorCo
de.con2('NAMED_PARAMETER_OUTSIDE_GROUP', 91, "Named parameters must be enclosed
in curly braces ('{' and '}')"); | 5840 static final ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = new ParserErrorCo
de.con2('NAMED_PARAMETER_OUTSIDE_GROUP', 91, "Named parameters must be enclosed
in curly braces ('{' and '}')"); |
| 5826 static final ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE = new Parser
ErrorCode.con2('NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE', 92, "Native functions can
only be declared in the SDK and code that is loaded through native extensions")
; | 5841 static final ParserErrorCode NATIVE_CLAUSE_IN_NON_SDK_CODE = new ParserErrorCo
de.con2('NATIVE_CLAUSE_IN_NON_SDK_CODE', 92, "Native clause can only be used in
the SDK and code that is loaded through native extensions"); |
| 5827 static final ParserErrorCode NON_CONSTRUCTOR_FACTORY = new ParserErrorCode.con
2('NON_CONSTRUCTOR_FACTORY', 93, "Only constructors can be declared to be a 'fac
tory'"); | 5842 static final ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE = new Parser
ErrorCode.con2('NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE', 93, "Native functions can
only be declared in the SDK and code that is loaded through native extensions")
; |
| 5828 static final ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = new ParserErrorCode
.con2('NON_IDENTIFIER_LIBRARY_NAME', 94, "The name of a library must be an ident
ifier"); | 5843 static final ParserErrorCode NON_CONSTRUCTOR_FACTORY = new ParserErrorCode.con
2('NON_CONSTRUCTOR_FACTORY', 94, "Only constructors can be declared to be a 'fac
tory'"); |
| 5829 static final ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = new ParserErrorCo
de.con2('NON_PART_OF_DIRECTIVE_IN_PART', 95, "The part-of directive must be the
only directive in a part"); | 5844 static final ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = new ParserErrorCode
.con2('NON_IDENTIFIER_LIBRARY_NAME', 95, "The name of a library must be an ident
ifier"); |
| 5830 static final ParserErrorCode NON_USER_DEFINABLE_OPERATOR = new ParserErrorCode
.con2('NON_USER_DEFINABLE_OPERATOR', 96, "The operator '%s' is not user definabl
e"); | 5845 static final ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = new ParserErrorCo
de.con2('NON_PART_OF_DIRECTIVE_IN_PART', 96, "The part-of directive must be the
only directive in a part"); |
| 5831 static final ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = new ParserErr
orCode.con2('NORMAL_BEFORE_OPTIONAL_PARAMETERS', 97, "Normal parameters must occ
ur before optional parameters"); | 5846 static final ParserErrorCode NON_USER_DEFINABLE_OPERATOR = new ParserErrorCode
.con2('NON_USER_DEFINABLE_OPERATOR', 97, "The operator '%s' is not user definabl
e"); |
| 5832 static final ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = new ParserError
Code.con2('POSITIONAL_AFTER_NAMED_ARGUMENT', 98, "Positional arguments must occu
r before named arguments"); | 5847 static final ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = new ParserErr
orCode.con2('NORMAL_BEFORE_OPTIONAL_PARAMETERS', 98, "Normal parameters must occ
ur before optional parameters"); |
| 5833 static final ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = new ParserEr
rorCode.con2('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 99, "Positional parameters mu
st be enclosed in square brackets ('[' and ']')"); | 5848 static final ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = new ParserError
Code.con2('POSITIONAL_AFTER_NAMED_ARGUMENT', 99, "Positional arguments must occu
r before named arguments"); |
| 5834 static final ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = new Pars
erErrorCode.con2('REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR', 100, "Only factory co
nstructor can specify '=' redirection."); | 5849 static final ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = new ParserEr
rorCode.con2('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 100, "Positional parameters m
ust be enclosed in square brackets ('[' and ']')"); |
| 5835 static final ParserErrorCode STATIC_AFTER_CONST = new ParserErrorCode.con2('ST
ATIC_AFTER_CONST', 101, "The modifier 'static' should be before the modifier 'co
nst'"); | 5850 static final ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = new Pars
erErrorCode.con2('REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR', 101, "Only factory co
nstructor can specify '=' redirection."); |
| 5836 static final ParserErrorCode STATIC_AFTER_FINAL = new ParserErrorCode.con2('ST
ATIC_AFTER_FINAL', 102, "The modifier 'static' should be before the modifier 'fi
nal'"); | 5851 static final ParserErrorCode STATIC_AFTER_CONST = new ParserErrorCode.con2('ST
ATIC_AFTER_CONST', 102, "The modifier 'static' should be before the modifier 'co
nst'"); |
| 5837 static final ParserErrorCode STATIC_AFTER_VAR = new ParserErrorCode.con2('STAT
IC_AFTER_VAR', 103, "The modifier 'static' should be before the modifier 'var'")
; | 5852 static final ParserErrorCode STATIC_AFTER_FINAL = new ParserErrorCode.con2('ST
ATIC_AFTER_FINAL', 103, "The modifier 'static' should be before the modifier 'fi
nal'"); |
| 5838 static final ParserErrorCode STATIC_CONSTRUCTOR = new ParserErrorCode.con2('ST
ATIC_CONSTRUCTOR', 104, "Constructors cannot be static"); | 5853 static final ParserErrorCode STATIC_AFTER_VAR = new ParserErrorCode.con2('STAT
IC_AFTER_VAR', 104, "The modifier 'static' should be before the modifier 'var'")
; |
| 5839 static final ParserErrorCode STATIC_GETTER_WITHOUT_BODY = new ParserErrorCode.
con2('STATIC_GETTER_WITHOUT_BODY', 105, "A 'static' getter must have a body"); | 5854 static final ParserErrorCode STATIC_CONSTRUCTOR = new ParserErrorCode.con2('ST
ATIC_CONSTRUCTOR', 105, "Constructors cannot be static"); |
| 5840 static final ParserErrorCode STATIC_OPERATOR = new ParserErrorCode.con2('STATI
C_OPERATOR', 106, "Operators cannot be static"); | 5855 static final ParserErrorCode STATIC_GETTER_WITHOUT_BODY = new ParserErrorCode.
con2('STATIC_GETTER_WITHOUT_BODY', 106, "A 'static' getter must have a body"); |
| 5841 static final ParserErrorCode STATIC_SETTER_WITHOUT_BODY = new ParserErrorCode.
con2('STATIC_SETTER_WITHOUT_BODY', 107, "A 'static' setter must have a body"); | 5856 static final ParserErrorCode STATIC_OPERATOR = new ParserErrorCode.con2('STATI
C_OPERATOR', 107, "Operators cannot be static"); |
| 5842 static final ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = new ParserErrorCod
e.con2('STATIC_TOP_LEVEL_DECLARATION', 108, "Top-level declarations cannot be de
clared to be 'static'"); | 5857 static final ParserErrorCode STATIC_SETTER_WITHOUT_BODY = new ParserErrorCode.
con2('STATIC_SETTER_WITHOUT_BODY', 108, "A 'static' setter must have a body"); |
| 5843 static final ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = new ParserEr
rorCode.con2('SWITCH_HAS_CASE_AFTER_DEFAULT_CASE', 109, "The 'default' case shou
ld be the last case in a switch statement"); | 5858 static final ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = new ParserErrorCod
e.con2('STATIC_TOP_LEVEL_DECLARATION', 109, "Top-level declarations cannot be de
clared to be 'static'"); |
| 5844 static final ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES = new ParserErr
orCode.con2('SWITCH_HAS_MULTIPLE_DEFAULT_CASES', 110, "The 'default' case can on
ly be declared once"); | 5859 static final ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = new ParserEr
rorCode.con2('SWITCH_HAS_CASE_AFTER_DEFAULT_CASE', 110, "The 'default' case shou
ld be the last case in a switch statement"); |
| 5845 static final ParserErrorCode TOP_LEVEL_OPERATOR = new ParserErrorCode.con2('TO
P_LEVEL_OPERATOR', 111, "Operators must be declared within a class"); | 5860 static final ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES = new ParserErr
orCode.con2('SWITCH_HAS_MULTIPLE_DEFAULT_CASES', 111, "The 'default' case can on
ly be declared once"); |
| 5846 static final ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = new P
arserErrorCode.con2('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 112, "There is
no '%s' to open a parameter group"); | 5861 static final ParserErrorCode TOP_LEVEL_OPERATOR = new ParserErrorCode.con2('TO
P_LEVEL_OPERATOR', 112, "Operators must be declared within a class"); |
| 5847 static final ParserErrorCode UNEXPECTED_TOKEN = new ParserErrorCode.con2('UNEX
PECTED_TOKEN', 113, "Unexpected token '%s'"); | 5862 static final ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = new P
arserErrorCode.con2('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 113, "There is
no '%s' to open a parameter group"); |
| 5848 static final ParserErrorCode WITH_BEFORE_EXTENDS = new ParserErrorCode.con2('W
ITH_BEFORE_EXTENDS', 114, "The extends clause must be before the with clause"); | 5863 static final ParserErrorCode UNEXPECTED_TOKEN = new ParserErrorCode.con2('UNEX
PECTED_TOKEN', 114, "Unexpected token '%s'"); |
| 5849 static final ParserErrorCode WITH_WITHOUT_EXTENDS = new ParserErrorCode.con2('
WITH_WITHOUT_EXTENDS', 115, "The with clause cannot be used without an extends c
lause"); | 5864 static final ParserErrorCode WITH_BEFORE_EXTENDS = new ParserErrorCode.con2('W
ITH_BEFORE_EXTENDS', 115, "The extends clause must be before the with clause"); |
| 5850 static final ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = new ParserE
rrorCode.con2('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 116, "The default value of
a named parameter should be preceeded by ':'"); | 5865 static final ParserErrorCode WITH_WITHOUT_EXTENDS = new ParserErrorCode.con2('
WITH_WITHOUT_EXTENDS', 116, "The with clause cannot be used without an extends c
lause"); |
| 5851 static final ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = new Pa
rserErrorCode.con2('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 117, "The default
value of a positional parameter should be preceeded by '='"); | 5866 static final ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = new ParserE
rrorCode.con2('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 117, "The default value of
a named parameter should be preceeded by ':'"); |
| 5852 static final ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = new Parser
ErrorCode.con2('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 118, "Expected '%s' to cl
ose parameter group"); | 5867 static final ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = new Pa
rserErrorCode.con2('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 118, "The default
value of a positional parameter should be preceeded by '='"); |
| 5853 static final ParserErrorCode VAR_AND_TYPE = new ParserErrorCode.con2('VAR_AND_
TYPE', 119, "Variables cannot be declared using both 'var' and a type name; remo
ve the 'var'"); | 5868 static final ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = new Parser
ErrorCode.con2('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 119, "Expected '%s' to cl
ose parameter group"); |
| 5854 static final ParserErrorCode VAR_AS_TYPE_NAME = new ParserErrorCode.con2('VAR_
AS_TYPE_NAME', 120, "The keyword 'var' cannot be used as a type name"); | 5869 static final ParserErrorCode VAR_AND_TYPE = new ParserErrorCode.con2('VAR_AND_
TYPE', 120, "Variables cannot be declared using both 'var' and a type name; remo
ve the 'var'"); |
| 5855 static final ParserErrorCode VAR_CLASS = new ParserErrorCode.con2('VAR_CLASS',
121, "Classes cannot be declared to be 'var'"); | 5870 static final ParserErrorCode VAR_AS_TYPE_NAME = new ParserErrorCode.con2('VAR_
AS_TYPE_NAME', 121, "The keyword 'var' cannot be used as a type name"); |
| 5856 static final ParserErrorCode VAR_RETURN_TYPE = new ParserErrorCode.con2('VAR_R
ETURN_TYPE', 122, "The return type cannot be 'var'"); | 5871 static final ParserErrorCode VAR_CLASS = new ParserErrorCode.con2('VAR_CLASS',
122, "Classes cannot be declared to be 'var'"); |
| 5857 static final ParserErrorCode VAR_TYPEDEF = new ParserErrorCode.con2('VAR_TYPED
EF', 123, "Type aliases cannot be declared to be 'var'"); | 5872 static final ParserErrorCode VAR_RETURN_TYPE = new ParserErrorCode.con2('VAR_R
ETURN_TYPE', 123, "The return type cannot be 'var'"); |
| 5858 static final ParserErrorCode VOID_PARAMETER = new ParserErrorCode.con2('VOID_P
ARAMETER', 124, "Parameters cannot have a type of 'void'"); | 5873 static final ParserErrorCode VAR_TYPEDEF = new ParserErrorCode.con2('VAR_TYPED
EF', 124, "Type aliases cannot be declared to be 'var'"); |
| 5859 static final ParserErrorCode VOID_VARIABLE = new ParserErrorCode.con2('VOID_VA
RIABLE', 125, "Variables cannot have a type of 'void'"); | 5874 static final ParserErrorCode VOID_PARAMETER = new ParserErrorCode.con2('VOID_P
ARAMETER', 125, "Parameters cannot have a type of 'void'"); |
| 5875 static final ParserErrorCode VOID_VARIABLE = new ParserErrorCode.con2('VOID_VA
RIABLE', 126, "Variables cannot have a type of 'void'"); |
| 5860 static final List<ParserErrorCode> values = [ | 5876 static final List<ParserErrorCode> values = [ |
| 5861 ABSTRACT_CLASS_MEMBER, | 5877 ABSTRACT_CLASS_MEMBER, |
| 5862 ABSTRACT_STATIC_METHOD, | 5878 ABSTRACT_STATIC_METHOD, |
| 5863 ABSTRACT_TOP_LEVEL_FUNCTION, | 5879 ABSTRACT_TOP_LEVEL_FUNCTION, |
| 5864 ABSTRACT_TOP_LEVEL_VARIABLE, | 5880 ABSTRACT_TOP_LEVEL_VARIABLE, |
| 5865 ABSTRACT_TYPEDEF, | 5881 ABSTRACT_TYPEDEF, |
| 5866 BREAK_OUTSIDE_OF_LOOP, | 5882 BREAK_OUTSIDE_OF_LOOP, |
| 5867 CONST_AND_FINAL, | 5883 CONST_AND_FINAL, |
| 5868 CONST_AND_VAR, | 5884 CONST_AND_VAR, |
| 5869 CONST_CLASS, | 5885 CONST_CLASS, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5943 MULTIPLE_EXTENDS_CLAUSES, | 5959 MULTIPLE_EXTENDS_CLAUSES, |
| 5944 MULTIPLE_IMPLEMENTS_CLAUSES, | 5960 MULTIPLE_IMPLEMENTS_CLAUSES, |
| 5945 MULTIPLE_LIBRARY_DIRECTIVES, | 5961 MULTIPLE_LIBRARY_DIRECTIVES, |
| 5946 MULTIPLE_NAMED_PARAMETER_GROUPS, | 5962 MULTIPLE_NAMED_PARAMETER_GROUPS, |
| 5947 MULTIPLE_PART_OF_DIRECTIVES, | 5963 MULTIPLE_PART_OF_DIRECTIVES, |
| 5948 MULTIPLE_POSITIONAL_PARAMETER_GROUPS, | 5964 MULTIPLE_POSITIONAL_PARAMETER_GROUPS, |
| 5949 MULTIPLE_VARIABLES_IN_FOR_EACH, | 5965 MULTIPLE_VARIABLES_IN_FOR_EACH, |
| 5950 MULTIPLE_WITH_CLAUSES, | 5966 MULTIPLE_WITH_CLAUSES, |
| 5951 NAMED_FUNCTION_EXPRESSION, | 5967 NAMED_FUNCTION_EXPRESSION, |
| 5952 NAMED_PARAMETER_OUTSIDE_GROUP, | 5968 NAMED_PARAMETER_OUTSIDE_GROUP, |
| 5969 NATIVE_CLAUSE_IN_NON_SDK_CODE, |
| 5953 NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE, | 5970 NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE, |
| 5954 NON_CONSTRUCTOR_FACTORY, | 5971 NON_CONSTRUCTOR_FACTORY, |
| 5955 NON_IDENTIFIER_LIBRARY_NAME, | 5972 NON_IDENTIFIER_LIBRARY_NAME, |
| 5956 NON_PART_OF_DIRECTIVE_IN_PART, | 5973 NON_PART_OF_DIRECTIVE_IN_PART, |
| 5957 NON_USER_DEFINABLE_OPERATOR, | 5974 NON_USER_DEFINABLE_OPERATOR, |
| 5958 NORMAL_BEFORE_OPTIONAL_PARAMETERS, | 5975 NORMAL_BEFORE_OPTIONAL_PARAMETERS, |
| 5959 POSITIONAL_AFTER_NAMED_ARGUMENT, | 5976 POSITIONAL_AFTER_NAMED_ARGUMENT, |
| 5960 POSITIONAL_PARAMETER_OUTSIDE_GROUP, | 5977 POSITIONAL_PARAMETER_OUTSIDE_GROUP, |
| 5961 REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR, | 5978 REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR, |
| 5962 STATIC_AFTER_CONST, | 5979 STATIC_AFTER_CONST, |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6440 visit(node.uri); | 6457 visit(node.uri); |
| 6441 visit7(" as ", node.prefix); | 6458 visit7(" as ", node.prefix); |
| 6442 visitList7(" ", node.combinators, " "); | 6459 visitList7(" ", node.combinators, " "); |
| 6443 _writer.print(';'); | 6460 _writer.print(';'); |
| 6444 return null; | 6461 return null; |
| 6445 } | 6462 } |
| 6446 Object visitIndexExpression(IndexExpression node) { | 6463 Object visitIndexExpression(IndexExpression node) { |
| 6447 if (node.isCascaded) { | 6464 if (node.isCascaded) { |
| 6448 _writer.print(".."); | 6465 _writer.print(".."); |
| 6449 } else { | 6466 } else { |
| 6450 visit(node.array); | 6467 visit(node.target); |
| 6451 } | 6468 } |
| 6452 _writer.print('['); | 6469 _writer.print('['); |
| 6453 visit(node.index); | 6470 visit(node.index); |
| 6454 _writer.print(']'); | 6471 _writer.print(']'); |
| 6455 return null; | 6472 return null; |
| 6456 } | 6473 } |
| 6457 Object visitInstanceCreationExpression(InstanceCreationExpression node) { | 6474 Object visitInstanceCreationExpression(InstanceCreationExpression node) { |
| 6458 visit8(node.keyword, " "); | 6475 visit8(node.keyword, " "); |
| 6459 visit(node.constructorName); | 6476 visit(node.constructorName); |
| 6460 visit(node.argumentList); | 6477 visit(node.argumentList); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6726 indentInc(); | 6743 indentInc(); |
| 6727 visitList5(node.members, "\n"); | 6744 visitList5(node.members, "\n"); |
| 6728 indentDec(); | 6745 indentDec(); |
| 6729 } | 6746 } |
| 6730 nl2(); | 6747 nl2(); |
| 6731 _writer.print('}'); | 6748 _writer.print('}'); |
| 6732 return null; | 6749 return null; |
| 6733 } | 6750 } |
| 6734 Object visitSymbolLiteral(SymbolLiteral node) { | 6751 Object visitSymbolLiteral(SymbolLiteral node) { |
| 6735 _writer.print("#"); | 6752 _writer.print("#"); |
| 6736 visitList5(node.components, "."); | 6753 visitList8(node.components, "."); |
| 6737 return null; | 6754 return null; |
| 6738 } | 6755 } |
| 6739 Object visitThisExpression(ThisExpression node) { | 6756 Object visitThisExpression(ThisExpression node) { |
| 6740 _writer.print("this"); | 6757 _writer.print("this"); |
| 6741 return null; | 6758 return null; |
| 6742 } | 6759 } |
| 6743 Object visitThrowExpression(ThrowExpression node) { | 6760 Object visitThrowExpression(ThrowExpression node) { |
| 6744 _writer.print("throw "); | 6761 _writer.print("throw "); |
| 6745 visit(node.expression); | 6762 visit(node.expression); |
| 6746 return null; | 6763 return null; |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6943 _writer.print(prefix); | 6960 _writer.print(prefix); |
| 6944 for (int i = 0; i < size; i++) { | 6961 for (int i = 0; i < size; i++) { |
| 6945 if (i > 0) { | 6962 if (i > 0) { |
| 6946 _writer.print(separator); | 6963 _writer.print(separator); |
| 6947 } | 6964 } |
| 6948 nodes[i].accept(this); | 6965 nodes[i].accept(this); |
| 6949 } | 6966 } |
| 6950 } | 6967 } |
| 6951 } | 6968 } |
| 6952 } | 6969 } |
| 6970 |
| 6971 /** |
| 6972 * Print a list of tokens, separated by the given separator. |
| 6973 * |
| 6974 * @param tokens the tokens to be printed |
| 6975 * @param separator the separator to be printed between adjacent tokens |
| 6976 */ |
| 6977 void visitList8(List<Token> tokens, String separator) { |
| 6978 int size = tokens.length; |
| 6979 for (int i = 0; i < size; i++) { |
| 6980 if ("\n" == separator) { |
| 6981 _writer.print("\n"); |
| 6982 indent(); |
| 6983 } else if (i > 0) { |
| 6984 _writer.print(separator); |
| 6985 } |
| 6986 _writer.print(tokens[i].lexeme); |
| 6987 } |
| 6988 } |
| 6953 } | 6989 } |
| OLD | NEW |