Index: pkg/analyzer/lib/src/generated/parser.dart |
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart |
index 40e865b2ef55a0a1f1a1e18e0af0655029d68f16..0a48a3894ba54d0e998d943d48deba2440db0ad2 100644 |
--- a/pkg/analyzer/lib/src/generated/parser.dart |
+++ b/pkg/analyzer/lib/src/generated/parser.dart |
@@ -1204,7 +1204,7 @@ class IncrementalParser { |
if (parent == null) { |
parseToken = findFirstToken(parseToken); |
parser.currentToken = parseToken; |
- return parser.parseCompilationUnit2() as ASTNode; |
+ return parser.parseCompilationUnit2(); |
} |
bool advanceToParent = false; |
try { |
@@ -1230,7 +1230,7 @@ class IncrementalParser { |
_updatedNode = newNode; |
if (identical(oldNode, originalStructure)) { |
ResolutionCopier.copyResolutionData(oldNode, newNode); |
- return newNode as ASTNode; |
+ return newNode; |
} |
ResolutionCopier.copyResolutionData(oldNode, newNode); |
IncrementalASTCloner cloner = new IncrementalASTCloner(oldNode, newNode, _tokenMap); |
@@ -1508,7 +1508,7 @@ class Parser { |
arguments.add(argument); |
if (foundNamedArgument) { |
if (!generatedError && argument is! NamedExpression) { |
- reportError10(ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT, []); |
+ reportError11(ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT, []); |
generatedError = true; |
} |
} else if (argument is NamedExpression) { |
@@ -1564,7 +1564,7 @@ class Parser { |
statements.add(statement); |
} |
if (identical(_currentToken, statementStart)) { |
- reportError11(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
+ reportError12(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
advance(); |
} |
statementStart = _currentToken; |
@@ -1609,7 +1609,7 @@ class Parser { |
} else { |
if (matchesIdentifier()) { |
if (matchesAny(peek(), [TokenType.EQ, TokenType.COMMA, TokenType.SEMICOLON])) { |
- reportError9(ParserErrorCode.VOID_VARIABLE, returnType, []); |
+ reportError10(ParserErrorCode.VOID_VARIABLE, returnType, []); |
return parseInitializedIdentifierList(commentAndMetadata, modifiers.staticKeyword, validateModifiersForField(modifiers), returnType); |
} |
} |
@@ -1617,7 +1617,7 @@ class Parser { |
validateModifiersForOperator(modifiers); |
return parseOperator(commentAndMetadata, modifiers.externalKeyword, returnType); |
} |
- reportError11(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []); |
+ reportError12(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []); |
return null; |
} |
} else if (matches(Keyword.GET) && matchesIdentifier2(peek())) { |
@@ -1634,7 +1634,7 @@ class Parser { |
validateModifiersForOperator(modifiers); |
return parseOperator(commentAndMetadata, modifiers.externalKeyword, null); |
} |
- reportError11(ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken, []); |
+ reportError12(ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken, []); |
return null; |
} else if (matches4(peek(), TokenType.PERIOD) && matchesIdentifier2(peek2(2)) && matches4(peek2(3), TokenType.OPEN_PAREN)) { |
return parseConstructor(commentAndMetadata, modifiers.externalKeyword, validateModifiersForConstructor(modifiers), modifiers.factoryKeyword, parseSimpleIdentifier(), andAdvance, parseSimpleIdentifier(), parseFormalParameterList()); |
@@ -1649,7 +1649,7 @@ class Parser { |
return parseMethodDeclaration2(commentAndMetadata, modifiers.externalKeyword, modifiers.staticKeyword, null, methodName, parameters); |
} else if (matchesAny(peek(), [TokenType.EQ, TokenType.COMMA, TokenType.SEMICOLON])) { |
if (modifiers.constKeyword == null && modifiers.finalKeyword == null && modifiers.varKeyword == null) { |
- reportError10(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []); |
+ reportError11(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []); |
} |
return parseInitializedIdentifierList(commentAndMetadata, modifiers.staticKeyword, validateModifiersForField(modifiers), null); |
} |
@@ -1671,7 +1671,7 @@ class Parser { |
validateModifiersForOperator(modifiers); |
return parseOperator(commentAndMetadata, modifiers.externalKeyword, type); |
} |
- reportError11(ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken, []); |
+ reportError12(ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken, []); |
try { |
lockErrorListener(); |
return parseInitializedIdentifierList(commentAndMetadata, modifiers.staticKeyword, validateModifiersForField(modifiers), type); |
@@ -1682,7 +1682,7 @@ class Parser { |
SimpleIdentifier methodName = parseSimpleIdentifier(); |
FormalParameterList parameters = parseFormalParameterList(); |
if (methodName.name == className) { |
- reportError9(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, type, []); |
+ reportError10(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, type, []); |
return parseConstructor(commentAndMetadata, modifiers.externalKeyword, validateModifiersForConstructor(modifiers), modifiers.factoryKeyword, methodName, null, null, parameters); |
} |
validateModifiersForGetterOrSetterOrMethod(modifiers); |
@@ -1732,15 +1732,15 @@ class Parser { |
if ((matches(Keyword.IMPORT) || matches(Keyword.EXPORT) || matches(Keyword.LIBRARY) || matches(Keyword.PART)) && !matches4(peek(), TokenType.PERIOD) && !matches4(peek(), TokenType.LT) && !matches4(peek(), TokenType.OPEN_PAREN)) { |
Directive directive = parseDirective(commentAndMetadata); |
if (declarations.length > 0 && !directiveFoundAfterDeclaration) { |
- reportError10(ParserErrorCode.DIRECTIVE_AFTER_DECLARATION, []); |
+ reportError11(ParserErrorCode.DIRECTIVE_AFTER_DECLARATION, []); |
directiveFoundAfterDeclaration = true; |
} |
if (directive is LibraryDirective) { |
if (libraryDirectiveFound) { |
- reportError10(ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES, []); |
+ reportError11(ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES, []); |
} else { |
if (directives.length > 0) { |
- reportError11(ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST, (directive as LibraryDirective).libraryToken, []); |
+ reportError12(ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST, directive.libraryToken, []); |
} |
libraryDirectiveFound = true; |
} |
@@ -1748,29 +1748,29 @@ class Parser { |
partDirectiveFound = true; |
} else if (partDirectiveFound) { |
if (directive is ExportDirective) { |
- reportError11(ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, (directive as NamespaceDirective).keyword, []); |
+ reportError12(ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, directive.keyword, []); |
} else if (directive is ImportDirective) { |
- reportError11(ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, (directive as NamespaceDirective).keyword, []); |
+ reportError12(ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, directive.keyword, []); |
} |
} |
if (directive is PartOfDirective) { |
if (partOfDirectiveFound) { |
- reportError10(ParserErrorCode.MULTIPLE_PART_OF_DIRECTIVES, []); |
+ reportError11(ParserErrorCode.MULTIPLE_PART_OF_DIRECTIVES, []); |
} else { |
int directiveCount = directives.length; |
for (int i = 0; i < directiveCount; i++) { |
- reportError11(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directives[i].keyword, []); |
+ reportError12(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directives[i].keyword, []); |
} |
partOfDirectiveFound = true; |
} |
} else { |
if (partOfDirectiveFound) { |
- reportError11(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directive.keyword, []); |
+ reportError12(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directive.keyword, []); |
} |
} |
directives.add(directive); |
} else if (matches5(TokenType.SEMICOLON)) { |
- reportError11(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
+ reportError12(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
advance(); |
} else { |
CompilationUnitMember member = parseCompilationUnitMember(commentAndMetadata); |
@@ -1779,7 +1779,7 @@ class Parser { |
} |
} |
if (identical(_currentToken, memberStart)) { |
- reportError11(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
+ reportError12(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
advance(); |
while (!matches5(TokenType.EOF) && !couldBeStartOfCompilationUnitMember()) { |
advance(); |
@@ -1965,9 +1965,9 @@ class Parser { |
firstParameter = false; |
} else if (!optional(TokenType.COMMA)) { |
if (getEndToken(leftParenthesis) != null) { |
- reportError10(ParserErrorCode.EXPECTED_TOKEN, [TokenType.COMMA.lexeme]); |
+ reportError11(ParserErrorCode.EXPECTED_TOKEN, [TokenType.COMMA.lexeme]); |
} else { |
- reportError11(ParserErrorCode.MISSING_CLOSING_PARENTHESIS, _currentToken.previous, []); |
+ reportError12(ParserErrorCode.MISSING_CLOSING_PARENTHESIS, _currentToken.previous, []); |
break; |
} |
} |
@@ -1975,11 +1975,11 @@ class Parser { |
if (matches5(TokenType.OPEN_SQUARE_BRACKET)) { |
wasOptionalParameter = true; |
if (leftSquareBracket != null && !reportedMuliplePositionalGroups) { |
- reportError10(ParserErrorCode.MULTIPLE_POSITIONAL_PARAMETER_GROUPS, []); |
+ reportError11(ParserErrorCode.MULTIPLE_POSITIONAL_PARAMETER_GROUPS, []); |
reportedMuliplePositionalGroups = true; |
} |
if (leftCurlyBracket != null && !reportedMixedGroups) { |
- reportError10(ParserErrorCode.MIXED_PARAMETER_GROUPS, []); |
+ reportError11(ParserErrorCode.MIXED_PARAMETER_GROUPS, []); |
reportedMixedGroups = true; |
} |
leftSquareBracket = andAdvance; |
@@ -1988,11 +1988,11 @@ class Parser { |
} else if (matches5(TokenType.OPEN_CURLY_BRACKET)) { |
wasOptionalParameter = true; |
if (leftCurlyBracket != null && !reportedMulipleNamedGroups) { |
- reportError10(ParserErrorCode.MULTIPLE_NAMED_PARAMETER_GROUPS, []); |
+ reportError11(ParserErrorCode.MULTIPLE_NAMED_PARAMETER_GROUPS, []); |
reportedMulipleNamedGroups = true; |
} |
if (leftSquareBracket != null && !reportedMixedGroups) { |
- reportError10(ParserErrorCode.MIXED_PARAMETER_GROUPS, []); |
+ reportError11(ParserErrorCode.MIXED_PARAMETER_GROUPS, []); |
reportedMixedGroups = true; |
} |
leftCurlyBracket = andAdvance; |
@@ -2003,18 +2003,18 @@ class Parser { |
parameters.add(parameter); |
currentParameters.add(parameter); |
if (identical(kind, ParameterKind.REQUIRED) && wasOptionalParameter) { |
- reportError9(ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS, parameter, []); |
+ reportError10(ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS, parameter, []); |
} |
if (matches5(TokenType.CLOSE_SQUARE_BRACKET)) { |
rightSquareBracket = andAdvance; |
currentParameters = normalParameters; |
if (leftSquareBracket == null) { |
if (leftCurlyBracket != null) { |
- reportError10(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]); |
+ reportError11(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]); |
rightCurlyBracket = rightSquareBracket; |
rightSquareBracket = null; |
} else { |
- reportError10(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["["]); |
+ reportError11(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["["]); |
} |
} |
kind = ParameterKind.REQUIRED; |
@@ -2023,11 +2023,11 @@ class Parser { |
currentParameters = normalParameters; |
if (leftCurlyBracket == null) { |
if (leftSquareBracket != null) { |
- reportError10(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]); |
+ reportError11(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]); |
rightSquareBracket = rightCurlyBracket; |
rightCurlyBracket = null; |
} else { |
- reportError10(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["{"]); |
+ reportError11(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["{"]); |
} |
} |
kind = ParameterKind.REQUIRED; |
@@ -2035,10 +2035,10 @@ class Parser { |
} while (!matches5(TokenType.CLOSE_PAREN) && initialToken != _currentToken); |
Token rightParenthesis = expect2(TokenType.CLOSE_PAREN); |
if (leftSquareBracket != null && rightSquareBracket == null) { |
- reportError10(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]); |
+ reportError11(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]); |
} |
if (leftCurlyBracket != null && rightCurlyBracket == null) { |
- reportError10(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]); |
+ reportError11(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]); |
} |
if (leftSquareBracket == null) { |
leftSquareBracket = leftCurlyBracket; |
@@ -2194,7 +2194,7 @@ class Parser { |
FormalParameterList parameters = parseFormalParameterList(); |
if (thisKeyword == null) { |
if (holder.keyword != null) { |
- reportError11(ParserErrorCode.FUNCTION_TYPED_PARAMETER_VAR, holder.keyword, []); |
+ reportError12(ParserErrorCode.FUNCTION_TYPED_PARAMETER_VAR, holder.keyword, []); |
} |
return new FunctionTypedFormalParameter(commentAndMetadata.comment, commentAndMetadata.metadata, holder.type, identifier, parameters); |
} else { |
@@ -2204,9 +2204,9 @@ class Parser { |
TypeName type = holder.type; |
if (type != null) { |
if (matches3(type.name.beginToken, Keyword.VOID)) { |
- reportError11(ParserErrorCode.VOID_PARAMETER, type.name.beginToken, []); |
+ reportError12(ParserErrorCode.VOID_PARAMETER, type.name.beginToken, []); |
} else if (holder.keyword != null && matches3(holder.keyword, Keyword.VAR)) { |
- reportError11(ParserErrorCode.VAR_AND_TYPE, holder.keyword, []); |
+ reportError12(ParserErrorCode.VAR_AND_TYPE, holder.keyword, []); |
} |
} |
if (thisKeyword != null) { |
@@ -2268,7 +2268,7 @@ class Parser { |
if (matchesIdentifier()) { |
return new SimpleIdentifier(andAdvance); |
} |
- reportError10(ParserErrorCode.MISSING_IDENTIFIER, []); |
+ reportError11(ParserErrorCode.MISSING_IDENTIFIER, []); |
return createSyntheticIdentifier(); |
} |
@@ -2316,7 +2316,7 @@ class Parser { |
} |
} |
if (strings.length < 1) { |
- reportError10(ParserErrorCode.EXPECTED_STRING_LITERAL, []); |
+ reportError11(ParserErrorCode.EXPECTED_STRING_LITERAL, []); |
return createSyntheticStringLiteral(); |
} else if (strings.length == 1) { |
return strings[0]; |
@@ -2362,13 +2362,13 @@ class Parser { |
TypeName parseTypeName() { |
Identifier typeName; |
if (matches(Keyword.VAR)) { |
- reportError10(ParserErrorCode.VAR_AS_TYPE_NAME, []); |
+ reportError11(ParserErrorCode.VAR_AS_TYPE_NAME, []); |
typeName = new SimpleIdentifier(andAdvance); |
} else if (matchesIdentifier()) { |
typeName = parsePrefixedIdentifier(); |
} else { |
typeName = createSyntheticIdentifier(); |
- reportError10(ParserErrorCode.EXPECTED_TYPE_NAME, []); |
+ reportError11(ParserErrorCode.EXPECTED_TYPE_NAME, []); |
} |
TypeArgumentList typeArguments = null; |
if (matches5(TokenType.LT)) { |
@@ -2463,11 +2463,11 @@ class Parser { |
*/ |
void appendScalarValue(JavaStringBuilder builder, String escapeSequence, int scalarValue, int startIndex, int endIndex) { |
if (scalarValue < 0 || scalarValue > Character.MAX_CODE_POINT || (scalarValue >= 0xD800 && scalarValue <= 0xDFFF)) { |
- reportError10(ParserErrorCode.INVALID_CODE_POINT, [escapeSequence]); |
+ reportError11(ParserErrorCode.INVALID_CODE_POINT, [escapeSequence]); |
return; |
} |
if (scalarValue < Character.MAX_VALUE) { |
- builder.appendChar(scalarValue as int); |
+ builder.appendChar(scalarValue); |
} else { |
builder.append(Character.toChars(scalarValue)); |
} |
@@ -2614,7 +2614,7 @@ class Parser { |
*/ |
void ensureAssignable(Expression expression) { |
if (expression != null && !expression.isAssignable) { |
- reportError10(ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, []); |
+ reportError11(ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, []); |
} |
} |
@@ -2629,7 +2629,7 @@ class Parser { |
if (matches(keyword)) { |
return andAdvance; |
} |
- reportError10(ParserErrorCode.EXPECTED_TOKEN, [keyword.syntax]); |
+ reportError11(ParserErrorCode.EXPECTED_TOKEN, [keyword.syntax]); |
return _currentToken; |
} |
@@ -2645,9 +2645,9 @@ class Parser { |
return andAdvance; |
} |
if (identical(type, TokenType.SEMICOLON)) { |
- reportError11(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [type.lexeme]); |
+ reportError12(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [type.lexeme]); |
} else { |
- reportError10(ParserErrorCode.EXPECTED_TOKEN, [type.lexeme]); |
+ reportError11(ParserErrorCode.EXPECTED_TOKEN, [type.lexeme]); |
} |
return _currentToken; |
} |
@@ -2736,7 +2736,7 @@ class Parser { |
*/ |
Token getEndToken(Token beginToken) { |
if (beginToken is BeginToken) { |
- return (beginToken as BeginToken).endToken; |
+ return beginToken.endToken; |
} |
return null; |
} |
@@ -3166,7 +3166,7 @@ class Parser { |
ArgumentDefinitionTest parseArgumentDefinitionTest() { |
Token question = expect2(TokenType.QUESTION); |
SimpleIdentifier identifier = parseSimpleIdentifier(); |
- reportError11(ParserErrorCode.DEPRECATED_ARGUMENT_DEFINITION_TEST, question, []); |
+ reportError12(ParserErrorCode.DEPRECATED_ARGUMENT_DEFINITION_TEST, question, []); |
return new ArgumentDefinitionTest(question, identifier); |
} |
@@ -3185,13 +3185,13 @@ class Parser { |
Token leftParen = expect2(TokenType.OPEN_PAREN); |
Expression expression = parseExpression2(); |
if (expression is AssignmentExpression) { |
- reportError9(ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT, expression, []); |
+ reportError10(ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT, expression, []); |
} else if (expression is CascadeExpression) { |
- reportError9(ParserErrorCode.ASSERT_DOES_NOT_TAKE_CASCADE, expression, []); |
+ reportError10(ParserErrorCode.ASSERT_DOES_NOT_TAKE_CASCADE, expression, []); |
} else if (expression is ThrowExpression) { |
- reportError9(ParserErrorCode.ASSERT_DOES_NOT_TAKE_THROW, expression, []); |
+ reportError10(ParserErrorCode.ASSERT_DOES_NOT_TAKE_THROW, expression, []); |
} else if (expression is RethrowExpression) { |
- reportError9(ParserErrorCode.ASSERT_DOES_NOT_TAKE_RETHROW, expression, []); |
+ reportError10(ParserErrorCode.ASSERT_DOES_NOT_TAKE_RETHROW, expression, []); |
} |
Token rightParen = expect2(TokenType.CLOSE_PAREN); |
Token semicolon = expect2(TokenType.SEMICOLON); |
@@ -3273,7 +3273,7 @@ class Parser { |
return new PropertyAccess(prefix, period, parseSimpleIdentifier()); |
} else { |
if (!optional) { |
- reportError10(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, []); |
+ reportError11(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, []); |
} |
return prefix; |
} |
@@ -3346,7 +3346,7 @@ class Parser { |
label = parseSimpleIdentifier(); |
} |
if (!_inLoop && !_inSwitch && label == null) { |
- reportError11(ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, breakKeyword, []); |
+ reportError12(ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, breakKeyword, []); |
} |
Token semicolon = expect2(TokenType.SEMICOLON); |
return new BreakStatement(breakKeyword, label, semicolon); |
@@ -3382,7 +3382,7 @@ class Parser { |
expression = new IndexExpression.forCascade(period, leftBracket, index, rightBracket); |
period = null; |
} else { |
- reportError11(ParserErrorCode.MISSING_IDENTIFIER, _currentToken, [_currentToken.lexeme]); |
+ reportError12(ParserErrorCode.MISSING_IDENTIFIER, _currentToken, [_currentToken.lexeme]); |
functionName = createSyntheticIdentifier(); |
} |
if (identical(_currentToken.type, TokenType.OPEN_PAREN)) { |
@@ -3468,29 +3468,29 @@ class Parser { |
if (extendsClause == null) { |
extendsClause = parseExtendsClause(); |
if (withClause != null) { |
- reportError11(ParserErrorCode.WITH_BEFORE_EXTENDS, withClause.withKeyword, []); |
+ reportError12(ParserErrorCode.WITH_BEFORE_EXTENDS, withClause.withKeyword, []); |
} else if (implementsClause != null) { |
- reportError11(ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS, implementsClause.keyword, []); |
+ reportError12(ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS, implementsClause.keyword, []); |
} |
} else { |
- reportError11(ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES, extendsClause.keyword, []); |
+ reportError12(ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES, extendsClause.keyword, []); |
parseExtendsClause(); |
} |
} else if (matches(Keyword.WITH)) { |
if (withClause == null) { |
withClause = parseWithClause(); |
if (implementsClause != null) { |
- reportError11(ParserErrorCode.IMPLEMENTS_BEFORE_WITH, implementsClause.keyword, []); |
+ reportError12(ParserErrorCode.IMPLEMENTS_BEFORE_WITH, implementsClause.keyword, []); |
} |
} else { |
- reportError11(ParserErrorCode.MULTIPLE_WITH_CLAUSES, withClause.withKeyword, []); |
+ reportError12(ParserErrorCode.MULTIPLE_WITH_CLAUSES, withClause.withKeyword, []); |
parseWithClause(); |
} |
} else if (matches(Keyword.IMPLEMENTS)) { |
if (implementsClause == null) { |
implementsClause = parseImplementsClause(); |
} else { |
- reportError11(ParserErrorCode.MULTIPLE_IMPLEMENTS_CLAUSES, implementsClause.keyword, []); |
+ reportError12(ParserErrorCode.MULTIPLE_IMPLEMENTS_CLAUSES, implementsClause.keyword, []); |
parseImplementsClause(); |
} |
} else { |
@@ -3498,7 +3498,7 @@ class Parser { |
} |
} |
if (withClause != null && extendsClause == null) { |
- reportError11(ParserErrorCode.WITH_WITHOUT_EXTENDS, withClause.withKeyword, []); |
+ reportError12(ParserErrorCode.WITH_WITHOUT_EXTENDS, withClause.withKeyword, []); |
} |
NativeClause nativeClause = null; |
if (matches2(_NATIVE) && matches4(peek(), TokenType.STRING)) { |
@@ -3514,7 +3514,7 @@ class Parser { |
} else { |
leftBracket = createSyntheticToken2(TokenType.OPEN_CURLY_BRACKET); |
rightBracket = createSyntheticToken2(TokenType.CLOSE_CURLY_BRACKET); |
- reportError10(ParserErrorCode.MISSING_CLASS_BODY, []); |
+ reportError11(ParserErrorCode.MISSING_CLASS_BODY, []); |
} |
ClassDeclaration classDeclaration = new ClassDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, abstractKeyword, keyword, name, typeParameters, extendsClause, withClause, implementsClause, leftBracket, members, rightBracket); |
classDeclaration.nativeClause = nativeClause; |
@@ -3539,7 +3539,7 @@ class Parser { |
Token memberStart = _currentToken; |
while (!matches5(TokenType.EOF) && !matches5(TokenType.CLOSE_CURLY_BRACKET) && (closingBracket != null || (!matches(Keyword.CLASS) && !matches(Keyword.TYPEDEF)))) { |
if (matches5(TokenType.SEMICOLON)) { |
- reportError11(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
+ reportError12(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
advance(); |
} else { |
ClassMember member = parseClassMember(className); |
@@ -3548,7 +3548,7 @@ class Parser { |
} |
} |
if (identical(_currentToken, memberStart)) { |
- reportError11(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
+ reportError12(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
advance(); |
} |
memberStart = _currentToken; |
@@ -3596,12 +3596,12 @@ class Parser { |
semicolon = andAdvance; |
} else { |
if (matches5(TokenType.OPEN_CURLY_BRACKET)) { |
- reportError10(ParserErrorCode.EXPECTED_TOKEN, [TokenType.SEMICOLON.lexeme]); |
+ reportError11(ParserErrorCode.EXPECTED_TOKEN, [TokenType.SEMICOLON.lexeme]); |
Token leftBracket = andAdvance; |
parseClassMembers(className.name, getEndToken(leftBracket)); |
expect2(TokenType.CLOSE_CURLY_BRACKET); |
} else { |
- reportError11(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [TokenType.SEMICOLON.lexeme]); |
+ reportError12(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [TokenType.SEMICOLON.lexeme]); |
} |
semicolon = createSyntheticToken2(TokenType.SEMICOLON); |
} |
@@ -3795,7 +3795,7 @@ class Parser { |
validateModifiersForTopLevelFunction(modifiers); |
return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, returnType); |
} else if (matches(Keyword.OPERATOR) && isOperator(peek())) { |
- reportError11(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []); |
+ reportError12(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []); |
return convertToFunctionDeclaration(parseOperator(commentAndMetadata, modifiers.externalKeyword, returnType)); |
} else if (matchesIdentifier() && matchesAny(peek(), [ |
TokenType.OPEN_PAREN, |
@@ -3806,28 +3806,28 @@ class Parser { |
} else { |
if (matchesIdentifier()) { |
if (matchesAny(peek(), [TokenType.EQ, TokenType.COMMA, TokenType.SEMICOLON])) { |
- reportError9(ParserErrorCode.VOID_VARIABLE, returnType, []); |
+ reportError10(ParserErrorCode.VOID_VARIABLE, returnType, []); |
return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationList2(null, validateModifiersForTopLevelVariable(modifiers), null), expect2(TokenType.SEMICOLON)); |
} |
} |
- reportError11(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []); |
+ reportError12(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []); |
return null; |
} |
} else if ((matches(Keyword.GET) || matches(Keyword.SET)) && matchesIdentifier2(peek())) { |
validateModifiersForTopLevelFunction(modifiers); |
return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, null); |
} else if (matches(Keyword.OPERATOR) && isOperator(peek())) { |
- reportError11(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []); |
+ reportError12(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []); |
return convertToFunctionDeclaration(parseOperator(commentAndMetadata, modifiers.externalKeyword, null)); |
} else if (!matchesIdentifier()) { |
- reportError11(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []); |
+ reportError12(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []); |
return null; |
} else if (matches4(peek(), TokenType.OPEN_PAREN)) { |
validateModifiersForTopLevelFunction(modifiers); |
return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, null); |
} else if (matchesAny(peek(), [TokenType.EQ, TokenType.COMMA, TokenType.SEMICOLON])) { |
if (modifiers.constKeyword == null && modifiers.finalKeyword == null && modifiers.varKeyword == null) { |
- reportError10(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []); |
+ reportError11(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []); |
} |
return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationList2(null, validateModifiersForTopLevelVariable(modifiers), null), expect2(TokenType.SEMICOLON)); |
} |
@@ -3836,12 +3836,12 @@ class Parser { |
validateModifiersForTopLevelFunction(modifiers); |
return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, returnType); |
} else if (matches(Keyword.OPERATOR) && isOperator(peek())) { |
- reportError11(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []); |
+ reportError12(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []); |
return convertToFunctionDeclaration(parseOperator(commentAndMetadata, modifiers.externalKeyword, returnType)); |
} else if (matches5(TokenType.AT)) { |
return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationList2(null, validateModifiersForTopLevelVariable(modifiers), returnType), expect2(TokenType.SEMICOLON)); |
} else if (!matchesIdentifier()) { |
- reportError11(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []); |
+ reportError12(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []); |
Token semicolon; |
if (matches5(TokenType.SEMICOLON)) { |
semicolon = andAdvance; |
@@ -3918,21 +3918,21 @@ class Parser { |
redirectedConstructor = parseConstructorName(); |
body = new EmptyFunctionBody(expect2(TokenType.SEMICOLON)); |
if (factoryKeyword == null) { |
- reportError9(ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR, redirectedConstructor, []); |
+ reportError10(ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR, redirectedConstructor, []); |
} |
} else { |
body = parseFunctionBody(true, ParserErrorCode.MISSING_FUNCTION_BODY, false); |
if (constKeyword != null && factoryKeyword != null && externalKeyword == null) { |
- reportError11(ParserErrorCode.CONST_FACTORY, factoryKeyword, []); |
+ reportError12(ParserErrorCode.CONST_FACTORY, factoryKeyword, []); |
} else if (body is EmptyFunctionBody) { |
if (factoryKeyword != null && externalKeyword == null) { |
- reportError11(ParserErrorCode.FACTORY_WITHOUT_BODY, factoryKeyword, []); |
+ reportError12(ParserErrorCode.FACTORY_WITHOUT_BODY, factoryKeyword, []); |
} |
} else { |
if (constKeyword != null) { |
- reportError9(ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, body, []); |
+ reportError10(ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, body, []); |
} else if (!bodyAllowed) { |
- reportError9(ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY, body, []); |
+ reportError10(ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY, body, []); |
} |
} |
} |
@@ -3987,14 +3987,14 @@ class Parser { |
Statement parseContinueStatement() { |
Token continueKeyword = expect(Keyword.CONTINUE); |
if (!_inLoop && !_inSwitch) { |
- reportError11(ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, continueKeyword, []); |
+ reportError12(ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, continueKeyword, []); |
} |
SimpleIdentifier label = null; |
if (matchesIdentifier()) { |
label = parseSimpleIdentifier(); |
} |
if (_inSwitch && !_inLoop && label == null) { |
- reportError11(ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE, continueKeyword, []); |
+ reportError12(ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE, continueKeyword, []); |
} |
Token semicolon = expect2(TokenType.SEMICOLON); |
return new ContinueStatement(continueKeyword, label, semicolon); |
@@ -4127,7 +4127,7 @@ class Parser { |
while (_currentToken.type.isEqualityOperator) { |
Token operator = andAdvance; |
if (leftEqualityExpression) { |
- reportError9(ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND, expression, []); |
+ reportError10(ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND, expression, []); |
} |
expression = new BinaryExpression(expression, operator, parseRelationalExpression()); |
leftEqualityExpression = true; |
@@ -4201,7 +4201,7 @@ class Parser { |
if (isTypedIdentifier(_currentToken)) { |
type = parseReturnType(); |
} else if (!optional) { |
- reportError10(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []); |
+ reportError11(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []); |
} |
} |
return new FinalConstVarOrType(keyword, type); |
@@ -4229,18 +4229,18 @@ class Parser { |
Token seperator = andAdvance; |
Expression defaultValue = parseExpression2(); |
if (identical(kind, ParameterKind.NAMED)) { |
- reportError11(ParserErrorCode.WRONG_SEPARATOR_FOR_NAMED_PARAMETER, seperator, []); |
+ reportError12(ParserErrorCode.WRONG_SEPARATOR_FOR_NAMED_PARAMETER, seperator, []); |
} else if (identical(kind, ParameterKind.REQUIRED)) { |
- reportError9(ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP, parameter, []); |
+ reportError10(ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP, parameter, []); |
} |
return new DefaultFormalParameter(parameter, kind, seperator, defaultValue); |
} else if (matches5(TokenType.COLON)) { |
Token seperator = andAdvance; |
Expression defaultValue = parseExpression2(); |
if (identical(kind, ParameterKind.POSITIONAL)) { |
- reportError11(ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER, seperator, []); |
+ reportError12(ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER, seperator, []); |
} else if (identical(kind, ParameterKind.REQUIRED)) { |
- reportError9(ParserErrorCode.NAMED_PARAMETER_OUTSIDE_GROUP, parameter, []); |
+ reportError10(ParserErrorCode.NAMED_PARAMETER_OUTSIDE_GROUP, parameter, []); |
} |
return new DefaultFormalParameter(parameter, kind, seperator, defaultValue); |
} else if (kind != ParameterKind.REQUIRED) { |
@@ -4292,15 +4292,15 @@ class Parser { |
DeclaredIdentifier loopVariable = null; |
SimpleIdentifier identifier = null; |
if (variableList == null) { |
- reportError10(ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH, []); |
+ reportError11(ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH, []); |
} else { |
NodeList<VariableDeclaration> variables = variableList.variables; |
if (variables.length > 1) { |
- reportError10(ParserErrorCode.MULTIPLE_VARIABLES_IN_FOR_EACH, [variables.length.toString()]); |
+ reportError11(ParserErrorCode.MULTIPLE_VARIABLES_IN_FOR_EACH, [variables.length.toString()]); |
} |
VariableDeclaration variable = variables[0]; |
if (variable.initializer != null) { |
- reportError10(ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH, []); |
+ reportError11(ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH, []); |
} |
Token keyword = variableList.keyword; |
TypeName type = variableList.type; |
@@ -4367,7 +4367,7 @@ class Parser { |
try { |
if (matches5(TokenType.SEMICOLON)) { |
if (!mayBeEmpty) { |
- reportError10(emptyErrorCode, []); |
+ reportError11(emptyErrorCode, []); |
} |
return new EmptyFunctionBody(andAdvance); |
} else if (matches5(TokenType.FUNCTION)) { |
@@ -4395,7 +4395,7 @@ class Parser { |
} |
return new NativeFunctionBody(nativeToken, stringLiteral, expect2(TokenType.SEMICOLON)); |
} else { |
- reportError10(emptyErrorCode, []); |
+ reportError11(emptyErrorCode, []); |
return new EmptyFunctionBody(createSyntheticToken2(TokenType.SEMICOLON)); |
} |
} finally { |
@@ -4436,10 +4436,10 @@ class Parser { |
parameters = parseFormalParameterList(); |
validateFormalParameterList(parameters); |
} else { |
- reportError10(ParserErrorCode.MISSING_FUNCTION_PARAMETERS, []); |
+ reportError11(ParserErrorCode.MISSING_FUNCTION_PARAMETERS, []); |
} |
} else if (matches5(TokenType.OPEN_PAREN)) { |
- reportError10(ParserErrorCode.GETTER_WITH_PARAMETERS, []); |
+ reportError11(ParserErrorCode.GETTER_WITH_PARAMETERS, []); |
parseFormalParameterList(); |
} |
FunctionBody body; |
@@ -4485,9 +4485,9 @@ class Parser { |
Token propertyKeyword = declaration.propertyKeyword; |
if (propertyKeyword != null) { |
if (identical((propertyKeyword as KeywordToken).keyword, Keyword.GET)) { |
- reportError11(ParserErrorCode.GETTER_IN_FUNCTION, propertyKeyword, []); |
+ reportError12(ParserErrorCode.GETTER_IN_FUNCTION, propertyKeyword, []); |
} else { |
- reportError11(ParserErrorCode.SETTER_IN_FUNCTION, propertyKeyword, []); |
+ reportError12(ParserErrorCode.SETTER_IN_FUNCTION, propertyKeyword, []); |
} |
} |
return new FunctionDeclarationStatement(declaration); |
@@ -4519,12 +4519,12 @@ class Parser { |
typeParameters = parseTypeParameterList(); |
} |
if (matches5(TokenType.SEMICOLON) || matches5(TokenType.EOF)) { |
- reportError10(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []); |
+ reportError11(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []); |
FormalParameterList parameters = new FormalParameterList(createSyntheticToken2(TokenType.OPEN_PAREN), null, null, null, createSyntheticToken2(TokenType.CLOSE_PAREN)); |
Token semicolon = expect2(TokenType.SEMICOLON); |
return new FunctionTypeAlias(commentAndMetadata.comment, commentAndMetadata.metadata, keyword, returnType, name, typeParameters, parameters, semicolon); |
} else if (!matches5(TokenType.OPEN_PAREN)) { |
- reportError10(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []); |
+ reportError11(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []); |
return new FunctionTypeAlias(commentAndMetadata.comment, commentAndMetadata.metadata, keyword, returnType, name, typeParameters, new FormalParameterList(createSyntheticToken2(TokenType.OPEN_PAREN), null, null, null, createSyntheticToken2(TokenType.CLOSE_PAREN)), createSyntheticToken2(TokenType.SEMICOLON)); |
} |
FormalParameterList parameters = parseFormalParameterList(); |
@@ -4556,13 +4556,13 @@ class Parser { |
Token propertyKeyword = expect(Keyword.GET); |
SimpleIdentifier name = parseSimpleIdentifier(); |
if (matches5(TokenType.OPEN_PAREN) && matches4(peek(), TokenType.CLOSE_PAREN)) { |
- reportError10(ParserErrorCode.GETTER_WITH_PARAMETERS, []); |
+ reportError11(ParserErrorCode.GETTER_WITH_PARAMETERS, []); |
advance(); |
advance(); |
} |
FunctionBody body = parseFunctionBody(externalKeyword != null || staticKeyword == null, ParserErrorCode.STATIC_GETTER_WITHOUT_BODY, false); |
if (externalKeyword != null && body is! EmptyFunctionBody) { |
- reportError10(ParserErrorCode.EXTERNAL_GETTER_WITH_BODY, []); |
+ reportError11(ParserErrorCode.EXTERNAL_GETTER_WITH_BODY, []); |
} |
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, staticKeyword, returnType, propertyKeyword, null, name, null, body); |
} |
@@ -4718,9 +4718,9 @@ class Parser { |
return parseLibraryIdentifier(); |
} else if (matches5(TokenType.STRING)) { |
StringLiteral string = parseStringLiteral(); |
- reportError9(ParserErrorCode.NON_IDENTIFIER_LIBRARY_NAME, string, []); |
+ reportError10(ParserErrorCode.NON_IDENTIFIER_LIBRARY_NAME, string, []); |
} else { |
- reportError11(missingNameError, missingNameToken, []); |
+ reportError12(missingNameError, missingNameToken, []); |
} |
List<SimpleIdentifier> components = new List<SimpleIdentifier>(); |
components.add(createSyntheticIdentifier()); |
@@ -4791,7 +4791,7 @@ class Parser { |
} else if (matches5(TokenType.OPEN_SQUARE_BRACKET) || matches5(TokenType.INDEX)) { |
return parseListLiteral(modifier, typeArguments); |
} |
- reportError10(ParserErrorCode.EXPECTED_LIST_OR_MAP_LITERAL, []); |
+ reportError11(ParserErrorCode.EXPECTED_LIST_OR_MAP_LITERAL, []); |
return new ListLiteral(modifier, typeArguments, createSyntheticToken2(TokenType.OPEN_SQUARE_BRACKET), null, createSyntheticToken2(TokenType.CLOSE_SQUARE_BRACKET)); |
} |
@@ -4890,11 +4890,11 @@ class Parser { |
FunctionBody body = parseFunctionBody(externalKeyword != null || staticKeyword == null, ParserErrorCode.MISSING_FUNCTION_BODY, false); |
if (externalKeyword != null) { |
if (body is! EmptyFunctionBody) { |
- reportError9(ParserErrorCode.EXTERNAL_METHOD_WITH_BODY, body, []); |
+ reportError10(ParserErrorCode.EXTERNAL_METHOD_WITH_BODY, body, []); |
} |
} else if (staticKeyword != null) { |
if (body is EmptyFunctionBody) { |
- reportError9(ParserErrorCode.ABSTRACT_STATIC_METHOD, body, []); |
+ reportError10(ParserErrorCode.ABSTRACT_STATIC_METHOD, body, []); |
} |
} |
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, staticKeyword, returnType, null, null, name, parameters, body); |
@@ -4922,49 +4922,49 @@ class Parser { |
} |
if (matches(Keyword.ABSTRACT)) { |
if (modifiers.abstractKeyword != null) { |
- reportError10(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
+ reportError11(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
advance(); |
} else { |
modifiers.abstractKeyword = andAdvance; |
} |
} else if (matches(Keyword.CONST)) { |
if (modifiers.constKeyword != null) { |
- reportError10(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
+ reportError11(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
advance(); |
} else { |
modifiers.constKeyword = andAdvance; |
} |
} else if (matches(Keyword.EXTERNAL) && !matches4(peek(), TokenType.PERIOD) && !matches4(peek(), TokenType.LT)) { |
if (modifiers.externalKeyword != null) { |
- reportError10(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
+ reportError11(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
advance(); |
} else { |
modifiers.externalKeyword = andAdvance; |
} |
} else if (matches(Keyword.FACTORY) && !matches4(peek(), TokenType.PERIOD) && !matches4(peek(), TokenType.LT)) { |
if (modifiers.factoryKeyword != null) { |
- reportError10(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
+ reportError11(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
advance(); |
} else { |
modifiers.factoryKeyword = andAdvance; |
} |
} else if (matches(Keyword.FINAL)) { |
if (modifiers.finalKeyword != null) { |
- reportError10(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
+ reportError11(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
advance(); |
} else { |
modifiers.finalKeyword = andAdvance; |
} |
} else if (matches(Keyword.STATIC) && !matches4(peek(), TokenType.PERIOD) && !matches4(peek(), TokenType.LT)) { |
if (modifiers.staticKeyword != null) { |
- reportError10(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
+ reportError11(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
advance(); |
} else { |
modifiers.staticKeyword = andAdvance; |
} |
} else if (matches(Keyword.VAR)) { |
if (modifiers.varKeyword != null) { |
- reportError10(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
+ reportError11(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]); |
advance(); |
} else { |
modifiers.varKeyword = andAdvance; |
@@ -5100,13 +5100,13 @@ class Parser { |
} else { |
if (matchesIdentifier()) { |
if (matchesAny(peek(), [TokenType.EQ, TokenType.COMMA, TokenType.SEMICOLON])) { |
- reportError9(ParserErrorCode.VOID_VARIABLE, returnType, []); |
+ reportError10(ParserErrorCode.VOID_VARIABLE, returnType, []); |
return parseVariableDeclarationStatement(commentAndMetadata); |
} |
} else if (matches5(TokenType.CLOSE_CURLY_BRACKET)) { |
return parseVariableDeclarationStatement2(commentAndMetadata, null, returnType); |
} |
- reportError10(ParserErrorCode.MISSING_STATEMENT, []); |
+ reportError11(ParserErrorCode.MISSING_STATEMENT, []); |
return new EmptyStatement(createSyntheticToken2(TokenType.SEMICOLON)); |
} |
} else if (identical(keyword, Keyword.CONST)) { |
@@ -5128,7 +5128,7 @@ class Parser { |
} else if (identical(keyword, Keyword.NEW) || identical(keyword, Keyword.TRUE) || identical(keyword, Keyword.FALSE) || identical(keyword, Keyword.NULL) || identical(keyword, Keyword.SUPER) || identical(keyword, Keyword.THIS)) { |
return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON)); |
} else { |
- reportError10(ParserErrorCode.MISSING_STATEMENT, []); |
+ reportError11(ParserErrorCode.MISSING_STATEMENT, []); |
return new EmptyStatement(createSyntheticToken2(TokenType.SEMICOLON)); |
} |
} else if (matches5(TokenType.SEMICOLON)) { |
@@ -5138,7 +5138,7 @@ class Parser { |
} else if (isFunctionDeclaration()) { |
return parseFunctionDeclarationStatement(); |
} else if (matches5(TokenType.CLOSE_CURLY_BRACKET)) { |
- reportError10(ParserErrorCode.MISSING_STATEMENT, []); |
+ reportError11(ParserErrorCode.MISSING_STATEMENT, []); |
return new EmptyStatement(createSyntheticToken2(TokenType.SEMICOLON)); |
} else { |
return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON)); |
@@ -5168,17 +5168,17 @@ class Parser { |
if (matches(Keyword.OPERATOR)) { |
operatorKeyword = andAdvance; |
} else { |
- reportError11(ParserErrorCode.MISSING_KEYWORD_OPERATOR, _currentToken, []); |
+ reportError12(ParserErrorCode.MISSING_KEYWORD_OPERATOR, _currentToken, []); |
operatorKeyword = createSyntheticToken(Keyword.OPERATOR); |
} |
if (!_currentToken.isUserDefinableOperator) { |
- reportError10(ParserErrorCode.NON_USER_DEFINABLE_OPERATOR, [_currentToken.lexeme]); |
+ reportError11(ParserErrorCode.NON_USER_DEFINABLE_OPERATOR, [_currentToken.lexeme]); |
} |
SimpleIdentifier name = new SimpleIdentifier(andAdvance); |
if (matches5(TokenType.EQ)) { |
Token previous = _currentToken.previous; |
if ((matches4(previous, TokenType.EQ_EQ) || matches4(previous, TokenType.BANG_EQ)) && _currentToken.offset == previous.offset + 2) { |
- reportError10(ParserErrorCode.INVALID_OPERATOR, ["${previous.lexeme}${_currentToken.lexeme}"]); |
+ reportError11(ParserErrorCode.INVALID_OPERATOR, ["${previous.lexeme}${_currentToken.lexeme}"]); |
advance(); |
} |
} |
@@ -5186,7 +5186,7 @@ class Parser { |
validateFormalParameterList(parameters); |
FunctionBody body = parseFunctionBody(true, ParserErrorCode.MISSING_FUNCTION_BODY, false); |
if (externalKeyword != null && body is! EmptyFunctionBody) { |
- reportError10(ParserErrorCode.EXTERNAL_OPERATOR_WITH_BODY, []); |
+ reportError11(ParserErrorCode.EXTERNAL_OPERATOR_WITH_BODY, []); |
} |
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, null, returnType, null, operatorKeyword, name, parameters, body); |
} |
@@ -5271,7 +5271,7 @@ class Parser { |
return operand; |
} |
if (operand is Literal || operand is FunctionExpressionInvocation) { |
- reportError10(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, []); |
+ reportError11(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, []); |
} |
Token operator = andAdvance; |
return new PostfixExpression(operand, operator); |
@@ -5364,13 +5364,13 @@ class Parser { |
} else if (matches5(TokenType.QUESTION)) { |
return parseArgumentDefinitionTest(); |
} else if (matches(Keyword.VOID)) { |
- reportError10(ParserErrorCode.UNEXPECTED_TOKEN, [_currentToken.lexeme]); |
+ reportError11(ParserErrorCode.UNEXPECTED_TOKEN, [_currentToken.lexeme]); |
advance(); |
return parsePrimaryExpression(); |
} else if (matches5(TokenType.HASH)) { |
return parseSymbolLiteral(); |
} else { |
- reportError10(ParserErrorCode.MISSING_IDENTIFIER, []); |
+ reportError11(ParserErrorCode.MISSING_IDENTIFIER, []); |
return createSyntheticIdentifier(); |
} |
} |
@@ -5491,7 +5491,7 @@ class Parser { |
validateFormalParameterList(parameters); |
FunctionBody body = parseFunctionBody(externalKeyword != null || staticKeyword == null, ParserErrorCode.STATIC_SETTER_WITHOUT_BODY, false); |
if (externalKeyword != null && body is! EmptyFunctionBody) { |
- reportError10(ParserErrorCode.EXTERNAL_SETTER_WITH_BODY, []); |
+ reportError11(ParserErrorCode.EXTERNAL_SETTER_WITH_BODY, []); |
} |
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, staticKeyword, returnType, propertyKeyword, null, name, parameters, body); |
} |
@@ -5537,7 +5537,7 @@ class Parser { |
while (!matches5(TokenType.EOF) && !matches5(TokenType.CLOSE_CURLY_BRACKET) && !isSwitchMember()) { |
statements.add(parseStatement2()); |
if (identical(_currentToken, statementStart)) { |
- reportError11(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
+ reportError12(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]); |
advance(); |
} |
statementStart = _currentToken; |
@@ -5635,7 +5635,7 @@ class Parser { |
SimpleIdentifier identifier = parseSimpleIdentifier(); |
String label = identifier.token.lexeme; |
if (definedLabels.contains(label)) { |
- reportError11(ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT, identifier.token, [label]); |
+ reportError12(ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT, identifier.token, [label]); |
} else { |
definedLabels.add(label); |
} |
@@ -5648,17 +5648,17 @@ class Parser { |
Token colon = expect2(TokenType.COLON); |
members.add(new SwitchCase(labels, caseKeyword, caseExpression, colon, parseStatements2())); |
if (defaultKeyword != null) { |
- reportError11(ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE, caseKeyword, []); |
+ reportError12(ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE, caseKeyword, []); |
} |
} else if (matches(Keyword.DEFAULT)) { |
if (defaultKeyword != null) { |
- reportError11(ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES, peek(), []); |
+ reportError12(ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES, peek(), []); |
} |
defaultKeyword = andAdvance; |
Token colon = expect2(TokenType.COLON); |
members.add(new SwitchDefault(labels, defaultKeyword, colon, parseStatements2())); |
} else { |
- reportError10(ParserErrorCode.EXPECTED_CASE_OR_DEFAULT, []); |
+ reportError11(ParserErrorCode.EXPECTED_CASE_OR_DEFAULT, []); |
while (!matches5(TokenType.EOF) && !matches5(TokenType.CLOSE_CURLY_BRACKET) && !matches(Keyword.CASE) && !matches(Keyword.DEFAULT)) { |
advance(); |
} |
@@ -5691,7 +5691,7 @@ class Parser { |
if (matchesIdentifier()) { |
components.add(andAdvance); |
} else { |
- reportError10(ParserErrorCode.MISSING_IDENTIFIER, []); |
+ reportError11(ParserErrorCode.MISSING_IDENTIFIER, []); |
components.add(createSyntheticToken2(TokenType.IDENTIFIER)); |
break; |
} |
@@ -5699,7 +5699,7 @@ class Parser { |
} else if (_currentToken.isOperator) { |
components.add(andAdvance); |
} else { |
- reportError10(ParserErrorCode.MISSING_IDENTIFIER, []); |
+ reportError11(ParserErrorCode.MISSING_IDENTIFIER, []); |
components.add(createSyntheticToken2(TokenType.IDENTIFIER)); |
} |
return new SymbolLiteral(poundSign, new List.from(components)); |
@@ -5718,7 +5718,7 @@ class Parser { |
Expression parseThrowExpression() { |
Token keyword = expect(Keyword.THROW); |
if (matches5(TokenType.SEMICOLON) || matches5(TokenType.CLOSE_PAREN)) { |
- reportError11(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []); |
+ reportError12(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []); |
return new ThrowExpression(keyword, createSyntheticIdentifier()); |
} |
Expression expression = parseExpression2(); |
@@ -5738,7 +5738,7 @@ class Parser { |
Expression parseThrowExpressionWithoutCascade() { |
Token keyword = expect(Keyword.THROW); |
if (matches5(TokenType.SEMICOLON) || matches5(TokenType.CLOSE_PAREN)) { |
- reportError11(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []); |
+ reportError12(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []); |
return new ThrowExpression(keyword, createSyntheticIdentifier()); |
} |
Expression expression = parseExpressionWithoutCascade(); |
@@ -5802,7 +5802,7 @@ class Parser { |
finallyClause = parseBlock(); |
} else { |
if (catchClauses.isEmpty) { |
- reportError10(ParserErrorCode.MISSING_CATCH_OR_FINALLY, []); |
+ reportError11(ParserErrorCode.MISSING_CATCH_OR_FINALLY, []); |
} |
} |
return new TryStatement(tryKeyword, body, catchClauses, finallyKeyword, finallyClause); |
@@ -5843,12 +5843,12 @@ class Parser { |
next = skipTypeParameterList(next); |
if (next != null && matches4(next, TokenType.EQ)) { |
TypeAlias typeAlias = parseClassTypeAlias(commentAndMetadata, null, keyword); |
- reportError11(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []); |
+ reportError12(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []); |
return typeAlias; |
} |
} else if (matches4(next, TokenType.EQ)) { |
TypeAlias typeAlias = parseClassTypeAlias(commentAndMetadata, null, keyword); |
- reportError11(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []); |
+ reportError12(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []); |
return typeAlias; |
} |
} |
@@ -5894,13 +5894,13 @@ class Parser { |
operator.previous.setNext(firstOperator); |
return new PrefixExpression(firstOperator, new PrefixExpression(secondOperator, new SuperExpression(andAdvance))); |
} else { |
- reportError10(ParserErrorCode.INVALID_OPERATOR_FOR_SUPER, [operator.lexeme]); |
+ reportError11(ParserErrorCode.INVALID_OPERATOR_FOR_SUPER, [operator.lexeme]); |
return new PrefixExpression(operator, new SuperExpression(andAdvance)); |
} |
} |
return new PrefixExpression(operator, parseAssignableExpression(false)); |
} else if (matches5(TokenType.PLUS)) { |
- reportError10(ParserErrorCode.MISSING_IDENTIFIER, []); |
+ reportError11(ParserErrorCode.MISSING_IDENTIFIER, []); |
return createSyntheticIdentifier(); |
} |
return parsePostfixExpression(); |
@@ -5961,7 +5961,7 @@ class Parser { |
*/ |
VariableDeclarationList parseVariableDeclarationList2(CommentAndMetadata commentAndMetadata, Token keyword, TypeName type) { |
if (type != null && keyword != null && matches3(keyword, Keyword.VAR)) { |
- reportError11(ParserErrorCode.VAR_AND_TYPE, keyword, []); |
+ reportError12(ParserErrorCode.VAR_AND_TYPE, keyword, []); |
} |
List<VariableDeclaration> variables = new List<VariableDeclaration>(); |
variables.add(parseVariableDeclaration()); |
@@ -6078,7 +6078,7 @@ class Parser { |
* @param node the node specifying the location of the error |
* @param arguments the arguments to the error, used to compose the error message |
*/ |
- void reportError9(ParserErrorCode errorCode, ASTNode node, List<Object> arguments) { |
+ void reportError10(ParserErrorCode errorCode, ASTNode node, List<Object> arguments) { |
reportError(new AnalysisError.con2(_source, node.offset, node.length, errorCode, arguments)); |
} |
@@ -6088,8 +6088,8 @@ class Parser { |
* @param errorCode the error code of the error to be reported |
* @param arguments the arguments to the error, used to compose the error message |
*/ |
- void reportError10(ParserErrorCode errorCode, List<Object> arguments) { |
- reportError11(errorCode, _currentToken, arguments); |
+ void reportError11(ParserErrorCode errorCode, List<Object> arguments) { |
+ reportError12(errorCode, _currentToken, arguments); |
} |
/** |
@@ -6099,7 +6099,7 @@ class Parser { |
* @param token the token specifying the location of the error |
* @param arguments the arguments to the error, used to compose the error message |
*/ |
- void reportError11(ParserErrorCode errorCode, Token token, List<Object> arguments) { |
+ void reportError12(ParserErrorCode errorCode, Token token, List<Object> arguments) { |
reportError(new AnalysisError.con2(_source, token.offset, token.length, errorCode, arguments)); |
} |
@@ -6548,28 +6548,28 @@ class Parser { |
builder.appendChar(0xB); |
} else if (currentChar == 0x78) { |
if (currentIndex + 2 >= length) { |
- reportError10(ParserErrorCode.INVALID_HEX_ESCAPE, []); |
+ reportError11(ParserErrorCode.INVALID_HEX_ESCAPE, []); |
return length; |
} |
int firstDigit = lexeme.codeUnitAt(currentIndex + 1); |
int secondDigit = lexeme.codeUnitAt(currentIndex + 2); |
if (!isHexDigit(firstDigit) || !isHexDigit(secondDigit)) { |
- reportError10(ParserErrorCode.INVALID_HEX_ESCAPE, []); |
+ reportError11(ParserErrorCode.INVALID_HEX_ESCAPE, []); |
} else { |
- builder.appendChar(((Character.digit(firstDigit, 16) << 4) + Character.digit(secondDigit, 16)) as int); |
+ builder.appendChar(((Character.digit(firstDigit, 16) << 4) + Character.digit(secondDigit, 16))); |
} |
return currentIndex + 3; |
} else if (currentChar == 0x75) { |
currentIndex++; |
if (currentIndex >= length) { |
- reportError10(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
+ reportError11(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
return length; |
} |
currentChar = lexeme.codeUnitAt(currentIndex); |
if (currentChar == 0x7B) { |
currentIndex++; |
if (currentIndex >= length) { |
- reportError10(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
+ reportError11(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
return length; |
} |
currentChar = lexeme.codeUnitAt(currentIndex); |
@@ -6577,7 +6577,7 @@ class Parser { |
int value = 0; |
while (currentChar != 0x7D) { |
if (!isHexDigit(currentChar)) { |
- reportError10(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
+ reportError11(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
currentIndex++; |
while (currentIndex < length && lexeme.codeUnitAt(currentIndex) != 0x7D) { |
currentIndex++; |
@@ -6588,19 +6588,19 @@ class Parser { |
value = (value << 4) + Character.digit(currentChar, 16); |
currentIndex++; |
if (currentIndex >= length) { |
- reportError10(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
+ reportError11(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
return length; |
} |
currentChar = lexeme.codeUnitAt(currentIndex); |
} |
if (digitCount < 1 || digitCount > 6) { |
- reportError10(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
+ reportError11(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
} |
appendScalarValue(builder, lexeme.substring(index, currentIndex + 1), value, index, currentIndex); |
return currentIndex + 1; |
} else { |
if (currentIndex + 3 >= length) { |
- reportError10(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
+ reportError11(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
return length; |
} |
int firstDigit = currentChar; |
@@ -6608,7 +6608,7 @@ class Parser { |
int thirdDigit = lexeme.codeUnitAt(currentIndex + 2); |
int fourthDigit = lexeme.codeUnitAt(currentIndex + 3); |
if (!isHexDigit(firstDigit) || !isHexDigit(secondDigit) || !isHexDigit(thirdDigit) || !isHexDigit(fourthDigit)) { |
- reportError10(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
+ reportError11(ParserErrorCode.INVALID_UNICODE_ESCAPE, []); |
} else { |
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); |
} |
@@ -6639,7 +6639,7 @@ class Parser { |
void validateFormalParameterList(FormalParameterList parameterList) { |
for (FormalParameter parameter in parameterList.parameters) { |
if (parameter is FieldFormalParameter) { |
- reportError9(ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, (parameter as FieldFormalParameter).identifier, []); |
+ reportError10(ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, parameter.identifier, []); |
} |
} |
} |
@@ -6653,16 +6653,16 @@ class Parser { |
Token validateModifiersForClass(Modifiers modifiers) { |
validateModifiersForTopLevelDeclaration(modifiers); |
if (modifiers.constKeyword != null) { |
- reportError11(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []); |
+ reportError12(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []); |
} |
if (modifiers.externalKeyword != null) { |
- reportError11(ParserErrorCode.EXTERNAL_CLASS, modifiers.externalKeyword, []); |
+ reportError12(ParserErrorCode.EXTERNAL_CLASS, modifiers.externalKeyword, []); |
} |
if (modifiers.finalKeyword != null) { |
- reportError11(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []); |
+ reportError12(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []); |
} |
if (modifiers.varKeyword != null) { |
- reportError11(ParserErrorCode.VAR_CLASS, modifiers.varKeyword, []); |
+ reportError12(ParserErrorCode.VAR_CLASS, modifiers.varKeyword, []); |
} |
return modifiers.abstractKeyword; |
} |
@@ -6676,25 +6676,25 @@ class Parser { |
*/ |
Token validateModifiersForConstructor(Modifiers modifiers) { |
if (modifiers.abstractKeyword != null) { |
- reportError10(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []); |
+ reportError11(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []); |
} |
if (modifiers.finalKeyword != null) { |
- reportError11(ParserErrorCode.FINAL_CONSTRUCTOR, modifiers.finalKeyword, []); |
+ reportError12(ParserErrorCode.FINAL_CONSTRUCTOR, modifiers.finalKeyword, []); |
} |
if (modifiers.staticKeyword != null) { |
- reportError11(ParserErrorCode.STATIC_CONSTRUCTOR, modifiers.staticKeyword, []); |
+ reportError12(ParserErrorCode.STATIC_CONSTRUCTOR, modifiers.staticKeyword, []); |
} |
if (modifiers.varKeyword != null) { |
- reportError11(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, modifiers.varKeyword, []); |
+ reportError12(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, modifiers.varKeyword, []); |
} |
Token externalKeyword = modifiers.externalKeyword; |
Token constKeyword = modifiers.constKeyword; |
Token factoryKeyword = modifiers.factoryKeyword; |
if (externalKeyword != null && constKeyword != null && constKeyword.offset < externalKeyword.offset) { |
- reportError11(ParserErrorCode.EXTERNAL_AFTER_CONST, externalKeyword, []); |
+ reportError12(ParserErrorCode.EXTERNAL_AFTER_CONST, externalKeyword, []); |
} |
if (externalKeyword != null && factoryKeyword != null && factoryKeyword.offset < externalKeyword.offset) { |
- reportError11(ParserErrorCode.EXTERNAL_AFTER_FACTORY, externalKeyword, []); |
+ reportError12(ParserErrorCode.EXTERNAL_AFTER_FACTORY, externalKeyword, []); |
} |
return constKeyword; |
} |
@@ -6708,13 +6708,13 @@ class Parser { |
*/ |
Token validateModifiersForField(Modifiers modifiers) { |
if (modifiers.abstractKeyword != null) { |
- reportError10(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []); |
+ reportError11(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []); |
} |
if (modifiers.externalKeyword != null) { |
- reportError11(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []); |
+ reportError12(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []); |
} |
if (modifiers.factoryKeyword != null) { |
- reportError11(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []); |
+ reportError12(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []); |
} |
Token staticKeyword = modifiers.staticKeyword; |
Token constKeyword = modifiers.constKeyword; |
@@ -6722,23 +6722,23 @@ class Parser { |
Token varKeyword = modifiers.varKeyword; |
if (constKeyword != null) { |
if (finalKeyword != null) { |
- reportError11(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []); |
+ reportError12(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []); |
} |
if (varKeyword != null) { |
- reportError11(ParserErrorCode.CONST_AND_VAR, varKeyword, []); |
+ reportError12(ParserErrorCode.CONST_AND_VAR, varKeyword, []); |
} |
if (staticKeyword != null && constKeyword.offset < staticKeyword.offset) { |
- reportError11(ParserErrorCode.STATIC_AFTER_CONST, staticKeyword, []); |
+ reportError12(ParserErrorCode.STATIC_AFTER_CONST, staticKeyword, []); |
} |
} else if (finalKeyword != null) { |
if (varKeyword != null) { |
- reportError11(ParserErrorCode.FINAL_AND_VAR, varKeyword, []); |
+ reportError12(ParserErrorCode.FINAL_AND_VAR, varKeyword, []); |
} |
if (staticKeyword != null && finalKeyword.offset < staticKeyword.offset) { |
- reportError11(ParserErrorCode.STATIC_AFTER_FINAL, staticKeyword, []); |
+ reportError12(ParserErrorCode.STATIC_AFTER_FINAL, staticKeyword, []); |
} |
} else if (varKeyword != null && staticKeyword != null && varKeyword.offset < staticKeyword.offset) { |
- reportError11(ParserErrorCode.STATIC_AFTER_VAR, staticKeyword, []); |
+ reportError12(ParserErrorCode.STATIC_AFTER_VAR, staticKeyword, []); |
} |
return lexicallyFirst([constKeyword, finalKeyword, varKeyword]); |
} |
@@ -6750,7 +6750,7 @@ class Parser { |
*/ |
void validateModifiersForFunctionDeclarationStatement(Modifiers modifiers) { |
if (modifiers.abstractKeyword != null || modifiers.constKeyword != null || modifiers.externalKeyword != null || modifiers.factoryKeyword != null || modifiers.finalKeyword != null || modifiers.staticKeyword != null || modifiers.varKeyword != null) { |
- reportError10(ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER, []); |
+ reportError11(ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER, []); |
} |
} |
@@ -6761,24 +6761,24 @@ class Parser { |
*/ |
void validateModifiersForGetterOrSetterOrMethod(Modifiers modifiers) { |
if (modifiers.abstractKeyword != null) { |
- reportError10(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []); |
+ reportError11(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []); |
} |
if (modifiers.constKeyword != null) { |
- reportError11(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []); |
+ reportError12(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []); |
} |
if (modifiers.factoryKeyword != null) { |
- reportError11(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []); |
+ reportError12(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []); |
} |
if (modifiers.finalKeyword != null) { |
- reportError11(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []); |
+ reportError12(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []); |
} |
if (modifiers.varKeyword != null) { |
- reportError11(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []); |
+ reportError12(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []); |
} |
Token externalKeyword = modifiers.externalKeyword; |
Token staticKeyword = modifiers.staticKeyword; |
if (externalKeyword != null && staticKeyword != null && staticKeyword.offset < externalKeyword.offset) { |
- reportError11(ParserErrorCode.EXTERNAL_AFTER_STATIC, externalKeyword, []); |
+ reportError12(ParserErrorCode.EXTERNAL_AFTER_STATIC, externalKeyword, []); |
} |
} |
@@ -6789,22 +6789,22 @@ class Parser { |
*/ |
void validateModifiersForOperator(Modifiers modifiers) { |
if (modifiers.abstractKeyword != null) { |
- reportError10(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []); |
+ reportError11(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []); |
} |
if (modifiers.constKeyword != null) { |
- reportError11(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []); |
+ reportError12(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []); |
} |
if (modifiers.factoryKeyword != null) { |
- reportError11(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []); |
+ reportError12(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []); |
} |
if (modifiers.finalKeyword != null) { |
- reportError11(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []); |
+ reportError12(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []); |
} |
if (modifiers.staticKeyword != null) { |
- reportError11(ParserErrorCode.STATIC_OPERATOR, modifiers.staticKeyword, []); |
+ reportError12(ParserErrorCode.STATIC_OPERATOR, modifiers.staticKeyword, []); |
} |
if (modifiers.varKeyword != null) { |
- reportError11(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []); |
+ reportError12(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []); |
} |
} |
@@ -6815,10 +6815,10 @@ class Parser { |
*/ |
void validateModifiersForTopLevelDeclaration(Modifiers modifiers) { |
if (modifiers.factoryKeyword != null) { |
- reportError11(ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION, modifiers.factoryKeyword, []); |
+ reportError12(ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION, modifiers.factoryKeyword, []); |
} |
if (modifiers.staticKeyword != null) { |
- reportError11(ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION, modifiers.staticKeyword, []); |
+ reportError12(ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION, modifiers.staticKeyword, []); |
} |
} |
@@ -6830,16 +6830,16 @@ class Parser { |
void validateModifiersForTopLevelFunction(Modifiers modifiers) { |
validateModifiersForTopLevelDeclaration(modifiers); |
if (modifiers.abstractKeyword != null) { |
- reportError10(ParserErrorCode.ABSTRACT_TOP_LEVEL_FUNCTION, []); |
+ reportError11(ParserErrorCode.ABSTRACT_TOP_LEVEL_FUNCTION, []); |
} |
if (modifiers.constKeyword != null) { |
- reportError11(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []); |
+ reportError12(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []); |
} |
if (modifiers.finalKeyword != null) { |
- reportError11(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []); |
+ reportError12(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []); |
} |
if (modifiers.varKeyword != null) { |
- reportError11(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []); |
+ reportError12(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []); |
} |
} |
@@ -6853,24 +6853,24 @@ class Parser { |
Token validateModifiersForTopLevelVariable(Modifiers modifiers) { |
validateModifiersForTopLevelDeclaration(modifiers); |
if (modifiers.abstractKeyword != null) { |
- reportError10(ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE, []); |
+ reportError11(ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE, []); |
} |
if (modifiers.externalKeyword != null) { |
- reportError11(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []); |
+ reportError12(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []); |
} |
Token constKeyword = modifiers.constKeyword; |
Token finalKeyword = modifiers.finalKeyword; |
Token varKeyword = modifiers.varKeyword; |
if (constKeyword != null) { |
if (finalKeyword != null) { |
- reportError11(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []); |
+ reportError12(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []); |
} |
if (varKeyword != null) { |
- reportError11(ParserErrorCode.CONST_AND_VAR, varKeyword, []); |
+ reportError12(ParserErrorCode.CONST_AND_VAR, varKeyword, []); |
} |
} else if (finalKeyword != null) { |
if (varKeyword != null) { |
- reportError11(ParserErrorCode.FINAL_AND_VAR, varKeyword, []); |
+ reportError12(ParserErrorCode.FINAL_AND_VAR, varKeyword, []); |
} |
} |
return lexicallyFirst([constKeyword, finalKeyword, varKeyword]); |
@@ -6885,19 +6885,19 @@ class Parser { |
void validateModifiersForTypedef(Modifiers modifiers) { |
validateModifiersForTopLevelDeclaration(modifiers); |
if (modifiers.abstractKeyword != null) { |
- reportError11(ParserErrorCode.ABSTRACT_TYPEDEF, modifiers.abstractKeyword, []); |
+ reportError12(ParserErrorCode.ABSTRACT_TYPEDEF, modifiers.abstractKeyword, []); |
} |
if (modifiers.constKeyword != null) { |
- reportError11(ParserErrorCode.CONST_TYPEDEF, modifiers.constKeyword, []); |
+ reportError12(ParserErrorCode.CONST_TYPEDEF, modifiers.constKeyword, []); |
} |
if (modifiers.externalKeyword != null) { |
- reportError11(ParserErrorCode.EXTERNAL_TYPEDEF, modifiers.externalKeyword, []); |
+ reportError12(ParserErrorCode.EXTERNAL_TYPEDEF, modifiers.externalKeyword, []); |
} |
if (modifiers.finalKeyword != null) { |
- reportError11(ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword, []); |
+ reportError12(ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword, []); |
} |
if (modifiers.varKeyword != null) { |
- reportError11(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword, []); |
+ reportError12(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword, []); |
} |
} |
} |
@@ -8166,13 +8166,13 @@ class ResolutionCopier implements ASTVisitor<bool> { |
return fromNode.accept(this); |
} |
if (toNode is PrefixedIdentifier) { |
- SimpleIdentifier prefix = (toNode as PrefixedIdentifier).prefix; |
+ SimpleIdentifier prefix = toNode.prefix; |
if (fromNode.runtimeType == prefix.runtimeType) { |
this._toNode = prefix; |
return fromNode.accept(this); |
} |
} else if (toNode is PropertyAccess) { |
- Expression target = (toNode as PropertyAccess).target; |
+ Expression target = toNode.target; |
if (fromNode.runtimeType == target.runtimeType) { |
this._toNode = target; |
return fromNode.accept(this); |