| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.parser; | 8 library engine.parser; |
| 9 | 9 |
| 10 import 'java_core.dart'; | 10 import 'java_core.dart'; |
| (...skipping 4897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4908 * importDirective ::= | 4908 * importDirective ::= |
| 4909 * metadata 'import' stringLiteral ('as' identifier)? combinator*';' | 4909 * metadata 'import' stringLiteral ('as' identifier)? combinator*';' |
| 4910 * </pre> | 4910 * </pre> |
| 4911 * | 4911 * |
| 4912 * @param commentAndMetadata the metadata to be associated with the directive | 4912 * @param commentAndMetadata the metadata to be associated with the directive |
| 4913 * @return the import directive that was parsed | 4913 * @return the import directive that was parsed |
| 4914 */ | 4914 */ |
| 4915 ImportDirective _parseImportDirective(CommentAndMetadata commentAndMetadata) { | 4915 ImportDirective _parseImportDirective(CommentAndMetadata commentAndMetadata) { |
| 4916 Token importKeyword = _expectKeyword(Keyword.IMPORT); | 4916 Token importKeyword = _expectKeyword(Keyword.IMPORT); |
| 4917 StringLiteral libraryUri = parseStringLiteral(); | 4917 StringLiteral libraryUri = parseStringLiteral(); |
| 4918 Token deferredToken = null; |
| 4918 Token asToken = null; | 4919 Token asToken = null; |
| 4919 SimpleIdentifier prefix = null; | 4920 SimpleIdentifier prefix = null; |
| 4921 if (_matchesKeyword(Keyword.DEFERRED)) { |
| 4922 deferredToken = andAdvance; |
| 4923 } |
| 4920 if (_matchesKeyword(Keyword.AS)) { | 4924 if (_matchesKeyword(Keyword.AS)) { |
| 4921 asToken = andAdvance; | 4925 asToken = andAdvance; |
| 4922 prefix = parseSimpleIdentifier(); | 4926 prefix = parseSimpleIdentifier(); |
| 4927 } else if (deferredToken != null) { |
| 4928 _reportErrorForCurrentToken(ParserErrorCode.MISSING_PREFIX_IN_DEFERRED_IMP
ORT, []); |
| 4923 } | 4929 } |
| 4924 List<Combinator> combinators = _parseCombinators(); | 4930 List<Combinator> combinators = _parseCombinators(); |
| 4925 Token semicolon = _expectSemicolon(); | 4931 Token semicolon = _expectSemicolon(); |
| 4926 return new ImportDirective(commentAndMetadata.comment, commentAndMetadata.me
tadata, importKeyword, libraryUri, asToken, prefix, combinators, semicolon); | 4932 return new ImportDirective(commentAndMetadata.comment, commentAndMetadata.me
tadata, importKeyword, libraryUri, deferredToken, asToken, prefix, combinators,
semicolon); |
| 4927 } | 4933 } |
| 4928 | 4934 |
| 4929 /** | 4935 /** |
| 4930 * Parse a list of initialized identifiers. | 4936 * Parse a list of initialized identifiers. |
| 4931 * | 4937 * |
| 4932 * <pre> | 4938 * <pre> |
| 4933 * ?? ::= | 4939 * ?? ::= |
| 4934 * 'static'? ('var' | type) initializedIdentifierList ';' | 4940 * 'static'? ('var' | type) initializedIdentifierList ';' |
| 4935 * | 'final' type? initializedIdentifierList ';' | 4941 * | 'final' type? initializedIdentifierList ';' |
| 4936 * | 4942 * |
| (...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6434 } | 6440 } |
| 6435 | 6441 |
| 6436 /** | 6442 /** |
| 6437 * Report an error with the given error code and arguments. | 6443 * Report an error with the given error code and arguments. |
| 6438 * | 6444 * |
| 6439 * @param errorCode the error code of the error to be reported | 6445 * @param errorCode the error code of the error to be reported |
| 6440 * @param token the token specifying the location of the error | 6446 * @param token the token specifying the location of the error |
| 6441 * @param arguments the arguments to the error, used to compose the error mess
age | 6447 * @param arguments the arguments to the error, used to compose the error mess
age |
| 6442 */ | 6448 */ |
| 6443 void _reportErrorForToken(ParserErrorCode errorCode, Token token, List<Object>
arguments) { | 6449 void _reportErrorForToken(ParserErrorCode errorCode, Token token, List<Object>
arguments) { |
| 6444 _reportError(new AnalysisError.con2(_source, token.offset, token.length, err
orCode, arguments)); | 6450 _reportError(new AnalysisError.con2(_source, token.offset, Math.max(token.le
ngth, 1), errorCode, arguments)); |
| 6445 } | 6451 } |
| 6446 | 6452 |
| 6447 /** | 6453 /** |
| 6448 * Skips a block with all containing blocks. | 6454 * Skips a block with all containing blocks. |
| 6449 */ | 6455 */ |
| 6450 void _skipBlock() { | 6456 void _skipBlock() { |
| 6451 _currentToken = (_currentToken as BeginToken).endToken.next; | 6457 _currentToken = (_currentToken as BeginToken).endToken.next; |
| 6452 } | 6458 } |
| 6453 | 6459 |
| 6454 /** | 6460 /** |
| (...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7490 static const ParserErrorCode MISSING_FUNCTION_PARAMETERS = const ParserErrorCo
de.con3('MISSING_FUNCTION_PARAMETERS', 76, "Functions must have an explicit list
of parameters"); | 7496 static const ParserErrorCode MISSING_FUNCTION_PARAMETERS = const ParserErrorCo
de.con3('MISSING_FUNCTION_PARAMETERS', 76, "Functions must have an explicit list
of parameters"); |
| 7491 | 7497 |
| 7492 static const ParserErrorCode MISSING_IDENTIFIER = const ParserErrorCode.con3('
MISSING_IDENTIFIER', 77, "Expected an identifier"); | 7498 static const ParserErrorCode MISSING_IDENTIFIER = const ParserErrorCode.con3('
MISSING_IDENTIFIER', 77, "Expected an identifier"); |
| 7493 | 7499 |
| 7494 static const ParserErrorCode MISSING_KEYWORD_OPERATOR = const ParserErrorCode.
con3('MISSING_KEYWORD_OPERATOR', 78, "Operator declarations must be preceeded by
the keyword 'operator'"); | 7500 static const ParserErrorCode MISSING_KEYWORD_OPERATOR = const ParserErrorCode.
con3('MISSING_KEYWORD_OPERATOR', 78, "Operator declarations must be preceeded by
the keyword 'operator'"); |
| 7495 | 7501 |
| 7496 static const ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = const ParserE
rrorCode.con3('MISSING_NAME_IN_LIBRARY_DIRECTIVE', 79, "Library directives must
include a library name"); | 7502 static const ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = const ParserE
rrorCode.con3('MISSING_NAME_IN_LIBRARY_DIRECTIVE', 79, "Library directives must
include a library name"); |
| 7497 | 7503 |
| 7498 static const ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE = const ParserE
rrorCode.con3('MISSING_NAME_IN_PART_OF_DIRECTIVE', 80, "Library directives must
include a library name"); | 7504 static const ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE = const ParserE
rrorCode.con3('MISSING_NAME_IN_PART_OF_DIRECTIVE', 80, "Library directives must
include a library name"); |
| 7499 | 7505 |
| 7500 static const ParserErrorCode MISSING_STATEMENT = const ParserErrorCode.con3('M
ISSING_STATEMENT', 81, "Expected a statement"); | 7506 static const ParserErrorCode MISSING_PREFIX_IN_DEFERRED_IMPORT = const ParserE
rrorCode.con3('MISSING_PREFIX_IN_DEFERRED_IMPORT', 81, "Deferred imports must ha
ve a prefix"); |
| 7501 | 7507 |
| 7502 static const ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP = const Pa
rserErrorCode.con3('MISSING_TERMINATOR_FOR_PARAMETER_GROUP', 82, "There is no '%
s' to close the parameter group"); | 7508 static const ParserErrorCode MISSING_STATEMENT = const ParserErrorCode.con3('M
ISSING_STATEMENT', 82, "Expected a statement"); |
| 7503 | 7509 |
| 7504 static const ParserErrorCode MISSING_TYPEDEF_PARAMETERS = const ParserErrorCod
e.con3('MISSING_TYPEDEF_PARAMETERS', 83, "Type aliases for functions must have a
n explicit list of parameters"); | 7510 static const ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP = const Pa
rserErrorCode.con3('MISSING_TERMINATOR_FOR_PARAMETER_GROUP', 83, "There is no '%
s' to close the parameter group"); |
| 7505 | 7511 |
| 7506 static const ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = const ParserErrorC
ode.con3('MISSING_VARIABLE_IN_FOR_EACH', 84, "A loop variable must be declared i
n a for-each loop before the 'in', but none were found"); | 7512 static const ParserErrorCode MISSING_TYPEDEF_PARAMETERS = const ParserErrorCod
e.con3('MISSING_TYPEDEF_PARAMETERS', 84, "Type aliases for functions must have a
n explicit list of parameters"); |
| 7507 | 7513 |
| 7508 static const ParserErrorCode MIXED_PARAMETER_GROUPS = const ParserErrorCode.co
n3('MIXED_PARAMETER_GROUPS', 85, "Cannot have both positional and named paramete
rs in a single parameter list"); | 7514 static const ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = const ParserErrorC
ode.con3('MISSING_VARIABLE_IN_FOR_EACH', 85, "A loop variable must be declared i
n a for-each loop before the 'in', but none were found"); |
| 7509 | 7515 |
| 7510 static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = const ParserErrorCode.
con3('MULTIPLE_EXTENDS_CLAUSES', 86, "Each class definition can have at most one
extends clause"); | 7516 static const ParserErrorCode MIXED_PARAMETER_GROUPS = const ParserErrorCode.co
n3('MIXED_PARAMETER_GROUPS', 86, "Cannot have both positional and named paramete
rs in a single parameter list"); |
| 7511 | 7517 |
| 7512 static const ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = const ParserErrorCo
de.con3('MULTIPLE_IMPLEMENTS_CLAUSES', 87, "Each class definition can have at mo
st one implements clause"); | 7518 static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = const ParserErrorCode.
con3('MULTIPLE_EXTENDS_CLAUSES', 87, "Each class definition can have at most one
extends clause"); |
| 7513 | 7519 |
| 7514 static const ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = const ParserErrorCo
de.con3('MULTIPLE_LIBRARY_DIRECTIVES', 88, "Only one library directive may be de
clared in a file"); | 7520 static const ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = const ParserErrorCo
de.con3('MULTIPLE_IMPLEMENTS_CLAUSES', 88, "Each class definition can have at mo
st one implements clause"); |
| 7515 | 7521 |
| 7516 static const ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = const ParserErr
orCode.con3('MULTIPLE_NAMED_PARAMETER_GROUPS', 89, "Cannot have multiple groups
of named parameters in a single parameter list"); | 7522 static const ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = const ParserErrorCo
de.con3('MULTIPLE_LIBRARY_DIRECTIVES', 89, "Only one library directive may be de
clared in a file"); |
| 7517 | 7523 |
| 7518 static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = const ParserErrorCo
de.con3('MULTIPLE_PART_OF_DIRECTIVES', 90, "Only one part-of directive may be de
clared in a file"); | 7524 static const ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = const ParserErr
orCode.con3('MULTIPLE_NAMED_PARAMETER_GROUPS', 90, "Cannot have multiple groups
of named parameters in a single parameter list"); |
| 7519 | 7525 |
| 7520 static const ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = const Pars
erErrorCode.con3('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 91, "Cannot have multip
le groups of positional parameters in a single parameter list"); | 7526 static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = const ParserErrorCo
de.con3('MULTIPLE_PART_OF_DIRECTIVES', 91, "Only one part-of directive may be de
clared in a file"); |
| 7521 | 7527 |
| 7522 static const ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = const ParserErro
rCode.con3('MULTIPLE_VARIABLES_IN_FOR_EACH', 92, "A single loop variable must be
declared in a for-each loop before the 'in', but %s were found"); | 7528 static const ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = const Pars
erErrorCode.con3('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 92, "Cannot have multip
le groups of positional parameters in a single parameter list"); |
| 7523 | 7529 |
| 7524 static const ParserErrorCode MULTIPLE_WITH_CLAUSES = const ParserErrorCode.con
3('MULTIPLE_WITH_CLAUSES', 93, "Each class definition can have at most one with
clause"); | 7530 static const ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = const ParserErro
rCode.con3('MULTIPLE_VARIABLES_IN_FOR_EACH', 93, "A single loop variable must be
declared in a for-each loop before the 'in', but %s were found"); |
| 7525 | 7531 |
| 7526 static const ParserErrorCode NAMED_FUNCTION_EXPRESSION = const ParserErrorCode
.con3('NAMED_FUNCTION_EXPRESSION', 94, "Function expressions cannot be named"); | 7532 static const ParserErrorCode MULTIPLE_WITH_CLAUSES = const ParserErrorCode.con
3('MULTIPLE_WITH_CLAUSES', 94, "Each class definition can have at most one with
clause"); |
| 7527 | 7533 |
| 7528 static const ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = const ParserError
Code.con3('NAMED_PARAMETER_OUTSIDE_GROUP', 95, "Named parameters must be enclose
d in curly braces ('{' and '}')"); | 7534 static const ParserErrorCode NAMED_FUNCTION_EXPRESSION = const ParserErrorCode
.con3('NAMED_FUNCTION_EXPRESSION', 95, "Function expressions cannot be named"); |
| 7529 | 7535 |
| 7530 static const ParserErrorCode NATIVE_CLAUSE_IN_NON_SDK_CODE = const ParserError
Code.con3('NATIVE_CLAUSE_IN_NON_SDK_CODE', 96, "Native clause can only be used i
n the SDK and code that is loaded through native extensions"); | 7536 static const ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = const ParserError
Code.con3('NAMED_PARAMETER_OUTSIDE_GROUP', 96, "Named parameters must be enclose
d in curly braces ('{' and '}')"); |
| 7531 | 7537 |
| 7532 static const ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE = const Pars
erErrorCode.con3('NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE', 97, "Native functions c
an only be declared in the SDK and code that is loaded through native extensions
"); | 7538 static const ParserErrorCode NATIVE_CLAUSE_IN_NON_SDK_CODE = const ParserError
Code.con3('NATIVE_CLAUSE_IN_NON_SDK_CODE', 97, "Native clause can only be used i
n the SDK and code that is loaded through native extensions"); |
| 7533 | 7539 |
| 7534 static const ParserErrorCode NON_CONSTRUCTOR_FACTORY = const ParserErrorCode.c
on3('NON_CONSTRUCTOR_FACTORY', 98, "Only constructors can be declared to be a 'f
actory'"); | 7540 static const ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE = const Pars
erErrorCode.con3('NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE', 98, "Native functions c
an only be declared in the SDK and code that is loaded through native extensions
"); |
| 7535 | 7541 |
| 7536 static const ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = const ParserErrorCo
de.con3('NON_IDENTIFIER_LIBRARY_NAME', 99, "The name of a library must be an ide
ntifier"); | 7542 static const ParserErrorCode NON_CONSTRUCTOR_FACTORY = const ParserErrorCode.c
on3('NON_CONSTRUCTOR_FACTORY', 99, "Only constructors can be declared to be a 'f
actory'"); |
| 7537 | 7543 |
| 7538 static const ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = const ParserError
Code.con3('NON_PART_OF_DIRECTIVE_IN_PART', 100, "The part-of directive must be t
he only directive in a part"); | 7544 static const ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = const ParserErrorCo
de.con3('NON_IDENTIFIER_LIBRARY_NAME', 100, "The name of a library must be an id
entifier"); |
| 7539 | 7545 |
| 7540 static const ParserErrorCode NON_USER_DEFINABLE_OPERATOR = const ParserErrorCo
de.con3('NON_USER_DEFINABLE_OPERATOR', 101, "The operator '%s' is not user defin
able"); | 7546 static const ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = const ParserError
Code.con3('NON_PART_OF_DIRECTIVE_IN_PART', 101, "The part-of directive must be t
he only directive in a part"); |
| 7541 | 7547 |
| 7542 static const ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = const ParserE
rrorCode.con3('NORMAL_BEFORE_OPTIONAL_PARAMETERS', 102, "Normal parameters must
occur before optional parameters"); | 7548 static const ParserErrorCode NON_USER_DEFINABLE_OPERATOR = const ParserErrorCo
de.con3('NON_USER_DEFINABLE_OPERATOR', 102, "The operator '%s' is not user defin
able"); |
| 7543 | 7549 |
| 7544 static const ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = const ParserErr
orCode.con3('POSITIONAL_AFTER_NAMED_ARGUMENT', 103, "Positional arguments must o
ccur before named arguments"); | 7550 static const ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = const ParserE
rrorCode.con3('NORMAL_BEFORE_OPTIONAL_PARAMETERS', 103, "Normal parameters must
occur before optional parameters"); |
| 7545 | 7551 |
| 7546 static const ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = const Parser
ErrorCode.con3('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 104, "Positional parameters
must be enclosed in square brackets ('[' and ']')"); | 7552 static const ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = const ParserErr
orCode.con3('POSITIONAL_AFTER_NAMED_ARGUMENT', 104, "Positional arguments must o
ccur before named arguments"); |
| 7547 | 7553 |
| 7548 static const ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = const Pa
rserErrorCode.con3('REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR', 105, "Only factory
constructor can specify '=' redirection."); | 7554 static const ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = const Parser
ErrorCode.con3('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 105, "Positional parameters
must be enclosed in square brackets ('[' and ']')"); |
| 7549 | 7555 |
| 7550 static const ParserErrorCode SETTER_IN_FUNCTION = const ParserErrorCode.con3('
SETTER_IN_FUNCTION', 106, "Setters cannot be defined within methods or functions
"); | 7556 static const ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = const Pa
rserErrorCode.con3('REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR', 106, "Only factory
constructor can specify '=' redirection."); |
| 7551 | 7557 |
| 7552 static const ParserErrorCode STATIC_AFTER_CONST = const ParserErrorCode.con3('
STATIC_AFTER_CONST', 107, "The modifier 'static' should be before the modifier '
const'"); | 7558 static const ParserErrorCode SETTER_IN_FUNCTION = const ParserErrorCode.con3('
SETTER_IN_FUNCTION', 107, "Setters cannot be defined within methods or functions
"); |
| 7553 | 7559 |
| 7554 static const ParserErrorCode STATIC_AFTER_FINAL = const ParserErrorCode.con3('
STATIC_AFTER_FINAL', 108, "The modifier 'static' should be before the modifier '
final'"); | 7560 static const ParserErrorCode STATIC_AFTER_CONST = const ParserErrorCode.con3('
STATIC_AFTER_CONST', 108, "The modifier 'static' should be before the modifier '
const'"); |
| 7555 | 7561 |
| 7556 static const ParserErrorCode STATIC_AFTER_VAR = const ParserErrorCode.con3('ST
ATIC_AFTER_VAR', 109, "The modifier 'static' should be before the modifier 'var'
"); | 7562 static const ParserErrorCode STATIC_AFTER_FINAL = const ParserErrorCode.con3('
STATIC_AFTER_FINAL', 109, "The modifier 'static' should be before the modifier '
final'"); |
| 7557 | 7563 |
| 7558 static const ParserErrorCode STATIC_CONSTRUCTOR = const ParserErrorCode.con3('
STATIC_CONSTRUCTOR', 110, "Constructors cannot be static"); | 7564 static const ParserErrorCode STATIC_AFTER_VAR = const ParserErrorCode.con3('ST
ATIC_AFTER_VAR', 110, "The modifier 'static' should be before the modifier 'var'
"); |
| 7559 | 7565 |
| 7560 static const ParserErrorCode STATIC_GETTER_WITHOUT_BODY = const ParserErrorCod
e.con3('STATIC_GETTER_WITHOUT_BODY', 111, "A 'static' getter must have a body"); | 7566 static const ParserErrorCode STATIC_CONSTRUCTOR = const ParserErrorCode.con3('
STATIC_CONSTRUCTOR', 111, "Constructors cannot be static"); |
| 7561 | 7567 |
| 7562 static const ParserErrorCode STATIC_OPERATOR = const ParserErrorCode.con3('STA
TIC_OPERATOR', 112, "Operators cannot be static"); | 7568 static const ParserErrorCode STATIC_GETTER_WITHOUT_BODY = const ParserErrorCod
e.con3('STATIC_GETTER_WITHOUT_BODY', 112, "A 'static' getter must have a body"); |
| 7563 | 7569 |
| 7564 static const ParserErrorCode STATIC_SETTER_WITHOUT_BODY = const ParserErrorCod
e.con3('STATIC_SETTER_WITHOUT_BODY', 113, "A 'static' setter must have a body"); | 7570 static const ParserErrorCode STATIC_OPERATOR = const ParserErrorCode.con3('STA
TIC_OPERATOR', 113, "Operators cannot be static"); |
| 7565 | 7571 |
| 7566 static const ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = const ParserErrorC
ode.con3('STATIC_TOP_LEVEL_DECLARATION', 114, "Top-level declarations cannot be
declared to be 'static'"); | 7572 static const ParserErrorCode STATIC_SETTER_WITHOUT_BODY = const ParserErrorCod
e.con3('STATIC_SETTER_WITHOUT_BODY', 114, "A 'static' setter must have a body"); |
| 7567 | 7573 |
| 7568 static const ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = const Parser
ErrorCode.con3('SWITCH_HAS_CASE_AFTER_DEFAULT_CASE', 115, "The 'default' case sh
ould be the last case in a switch statement"); | 7574 static const ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = const ParserErrorC
ode.con3('STATIC_TOP_LEVEL_DECLARATION', 115, "Top-level declarations cannot be
declared to be 'static'"); |
| 7569 | 7575 |
| 7570 static const ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES = const ParserE
rrorCode.con3('SWITCH_HAS_MULTIPLE_DEFAULT_CASES', 116, "The 'default' case can
only be declared once"); | 7576 static const ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = const Parser
ErrorCode.con3('SWITCH_HAS_CASE_AFTER_DEFAULT_CASE', 116, "The 'default' case sh
ould be the last case in a switch statement"); |
| 7571 | 7577 |
| 7572 static const ParserErrorCode TOP_LEVEL_OPERATOR = const ParserErrorCode.con3('
TOP_LEVEL_OPERATOR', 117, "Operators must be declared within a class"); | 7578 static const ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES = const ParserE
rrorCode.con3('SWITCH_HAS_MULTIPLE_DEFAULT_CASES', 117, "The 'default' case can
only be declared once"); |
| 7573 | 7579 |
| 7574 static const ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = const
ParserErrorCode.con3('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 118, "There i
s no '%s' to open a parameter group"); | 7580 static const ParserErrorCode TOP_LEVEL_OPERATOR = const ParserErrorCode.con3('
TOP_LEVEL_OPERATOR', 118, "Operators must be declared within a class"); |
| 7575 | 7581 |
| 7576 static const ParserErrorCode UNEXPECTED_TOKEN = const ParserErrorCode.con3('UN
EXPECTED_TOKEN', 119, "Unexpected token '%s'"); | 7582 static const ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = const
ParserErrorCode.con3('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 119, "There i
s no '%s' to open a parameter group"); |
| 7577 | 7583 |
| 7578 static const ParserErrorCode WITH_BEFORE_EXTENDS = const ParserErrorCode.con3(
'WITH_BEFORE_EXTENDS', 120, "The extends clause must be before the with clause")
; | 7584 static const ParserErrorCode UNEXPECTED_TOKEN = const ParserErrorCode.con3('UN
EXPECTED_TOKEN', 120, "Unexpected token '%s'"); |
| 7579 | 7585 |
| 7580 static const ParserErrorCode WITH_WITHOUT_EXTENDS = const ParserErrorCode.con3
('WITH_WITHOUT_EXTENDS', 121, "The with clause cannot be used without an extends
clause"); | 7586 static const ParserErrorCode WITH_BEFORE_EXTENDS = const ParserErrorCode.con3(
'WITH_BEFORE_EXTENDS', 121, "The extends clause must be before the with clause")
; |
| 7581 | 7587 |
| 7582 static const ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = const Parse
rErrorCode.con3('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 122, "The default value o
f a named parameter should be preceeded by ':'"); | 7588 static const ParserErrorCode WITH_WITHOUT_EXTENDS = const ParserErrorCode.con3
('WITH_WITHOUT_EXTENDS', 122, "The with clause cannot be used without an extends
clause"); |
| 7583 | 7589 |
| 7584 static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = const
ParserErrorCode.con3('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 123, "The defau
lt value of a positional parameter should be preceeded by '='"); | 7590 static const ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = const Parse
rErrorCode.con3('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 123, "The default value o
f a named parameter should be preceeded by ':'"); |
| 7585 | 7591 |
| 7586 static const ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = const Pars
erErrorCode.con3('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 124, "Expected '%s' to
close parameter group"); | 7592 static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = const
ParserErrorCode.con3('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 124, "The defau
lt value of a positional parameter should be preceeded by '='"); |
| 7587 | 7593 |
| 7588 static const ParserErrorCode VAR_AND_TYPE = const ParserErrorCode.con3('VAR_AN
D_TYPE', 125, "Variables cannot be declared using both 'var' and a type name; re
move the 'var'"); | 7594 static const ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = const Pars
erErrorCode.con3('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 125, "Expected '%s' to
close parameter group"); |
| 7589 | 7595 |
| 7590 static const ParserErrorCode VAR_AS_TYPE_NAME = const ParserErrorCode.con3('VA
R_AS_TYPE_NAME', 126, "The keyword 'var' cannot be used as a type name"); | 7596 static const ParserErrorCode VAR_AND_TYPE = const ParserErrorCode.con3('VAR_AN
D_TYPE', 126, "Variables cannot be declared using both 'var' and a type name; re
move the 'var'"); |
| 7591 | 7597 |
| 7592 static const ParserErrorCode VAR_CLASS = const ParserErrorCode.con3('VAR_CLASS
', 127, "Classes cannot be declared to be 'var'"); | 7598 static const ParserErrorCode VAR_AS_TYPE_NAME = const ParserErrorCode.con3('VA
R_AS_TYPE_NAME', 127, "The keyword 'var' cannot be used as a type name"); |
| 7593 | 7599 |
| 7594 static const ParserErrorCode VAR_RETURN_TYPE = const ParserErrorCode.con3('VAR
_RETURN_TYPE', 128, "The return type cannot be 'var'"); | 7600 static const ParserErrorCode VAR_CLASS = const ParserErrorCode.con3('VAR_CLASS
', 128, "Classes cannot be declared to be 'var'"); |
| 7595 | 7601 |
| 7596 static const ParserErrorCode VAR_TYPEDEF = const ParserErrorCode.con3('VAR_TYP
EDEF', 129, "Type aliases cannot be declared to be 'var'"); | 7602 static const ParserErrorCode VAR_RETURN_TYPE = const ParserErrorCode.con3('VAR
_RETURN_TYPE', 129, "The return type cannot be 'var'"); |
| 7597 | 7603 |
| 7598 static const ParserErrorCode VOID_PARAMETER = const ParserErrorCode.con3('VOID
_PARAMETER', 130, "Parameters cannot have a type of 'void'"); | 7604 static const ParserErrorCode VAR_TYPEDEF = const ParserErrorCode.con3('VAR_TYP
EDEF', 130, "Type aliases cannot be declared to be 'var'"); |
| 7599 | 7605 |
| 7600 static const ParserErrorCode VOID_VARIABLE = const ParserErrorCode.con3('VOID_
VARIABLE', 131, "Variables cannot have a type of 'void'"); | 7606 static const ParserErrorCode VOID_PARAMETER = const ParserErrorCode.con3('VOID
_PARAMETER', 131, "Parameters cannot have a type of 'void'"); |
| 7607 |
| 7608 static const ParserErrorCode VOID_VARIABLE = const ParserErrorCode.con3('VOID_
VARIABLE', 132, "Variables cannot have a type of 'void'"); |
| 7601 | 7609 |
| 7602 static const List<ParserErrorCode> values = const [ | 7610 static const List<ParserErrorCode> values = const [ |
| 7603 ABSTRACT_CLASS_MEMBER, | 7611 ABSTRACT_CLASS_MEMBER, |
| 7604 ABSTRACT_STATIC_METHOD, | 7612 ABSTRACT_STATIC_METHOD, |
| 7605 ABSTRACT_TOP_LEVEL_FUNCTION, | 7613 ABSTRACT_TOP_LEVEL_FUNCTION, |
| 7606 ABSTRACT_TOP_LEVEL_VARIABLE, | 7614 ABSTRACT_TOP_LEVEL_VARIABLE, |
| 7607 ABSTRACT_TYPEDEF, | 7615 ABSTRACT_TYPEDEF, |
| 7608 ASSERT_DOES_NOT_TAKE_ASSIGNMENT, | 7616 ASSERT_DOES_NOT_TAKE_ASSIGNMENT, |
| 7609 ASSERT_DOES_NOT_TAKE_CASCADE, | 7617 ASSERT_DOES_NOT_TAKE_CASCADE, |
| 7610 ASSERT_DOES_NOT_TAKE_THROW, | 7618 ASSERT_DOES_NOT_TAKE_THROW, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7674 MISSING_CLASS_BODY, | 7682 MISSING_CLASS_BODY, |
| 7675 MISSING_CLOSING_PARENTHESIS, | 7683 MISSING_CLOSING_PARENTHESIS, |
| 7676 MISSING_CONST_FINAL_VAR_OR_TYPE, | 7684 MISSING_CONST_FINAL_VAR_OR_TYPE, |
| 7677 MISSING_EXPRESSION_IN_THROW, | 7685 MISSING_EXPRESSION_IN_THROW, |
| 7678 MISSING_FUNCTION_BODY, | 7686 MISSING_FUNCTION_BODY, |
| 7679 MISSING_FUNCTION_PARAMETERS, | 7687 MISSING_FUNCTION_PARAMETERS, |
| 7680 MISSING_IDENTIFIER, | 7688 MISSING_IDENTIFIER, |
| 7681 MISSING_KEYWORD_OPERATOR, | 7689 MISSING_KEYWORD_OPERATOR, |
| 7682 MISSING_NAME_IN_LIBRARY_DIRECTIVE, | 7690 MISSING_NAME_IN_LIBRARY_DIRECTIVE, |
| 7683 MISSING_NAME_IN_PART_OF_DIRECTIVE, | 7691 MISSING_NAME_IN_PART_OF_DIRECTIVE, |
| 7692 MISSING_PREFIX_IN_DEFERRED_IMPORT, |
| 7684 MISSING_STATEMENT, | 7693 MISSING_STATEMENT, |
| 7685 MISSING_TERMINATOR_FOR_PARAMETER_GROUP, | 7694 MISSING_TERMINATOR_FOR_PARAMETER_GROUP, |
| 7686 MISSING_TYPEDEF_PARAMETERS, | 7695 MISSING_TYPEDEF_PARAMETERS, |
| 7687 MISSING_VARIABLE_IN_FOR_EACH, | 7696 MISSING_VARIABLE_IN_FOR_EACH, |
| 7688 MIXED_PARAMETER_GROUPS, | 7697 MIXED_PARAMETER_GROUPS, |
| 7689 MULTIPLE_EXTENDS_CLAUSES, | 7698 MULTIPLE_EXTENDS_CLAUSES, |
| 7690 MULTIPLE_IMPLEMENTS_CLAUSES, | 7699 MULTIPLE_IMPLEMENTS_CLAUSES, |
| 7691 MULTIPLE_LIBRARY_DIRECTIVES, | 7700 MULTIPLE_LIBRARY_DIRECTIVES, |
| 7692 MULTIPLE_NAMED_PARAMETER_GROUPS, | 7701 MULTIPLE_NAMED_PARAMETER_GROUPS, |
| 7693 MULTIPLE_PART_OF_DIRECTIVES, | 7702 MULTIPLE_PART_OF_DIRECTIVES, |
| (...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8962 return trampoline(target, arguments[0], arguments[1]); | 8971 return trampoline(target, arguments[0], arguments[1]); |
| 8963 case 3: | 8972 case 3: |
| 8964 return trampoline(target, arguments[0], arguments[1], arguments[2]); | 8973 return trampoline(target, arguments[0], arguments[1], arguments[2]); |
| 8965 case 4: | 8974 case 4: |
| 8966 return trampoline(target, arguments[0], arguments[1], arguments[2], argu
ments[3]); | 8975 return trampoline(target, arguments[0], arguments[1], arguments[2], argu
ments[3]); |
| 8967 default: | 8976 default: |
| 8968 throw new IllegalArgumentException("Not implemented for > 4 arguments"); | 8977 throw new IllegalArgumentException("Not implemented for > 4 arguments"); |
| 8969 } | 8978 } |
| 8970 } | 8979 } |
| 8971 } | 8980 } |
| OLD | NEW |