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

Unified Diff: pkg/analyzer/lib/src/generated/parser.dart

Issue 131233009: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 9647bf9e923e9753b8964be33a003cc632599579..108992e6fbd1f5c14042849cc94f104fc523b296 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -218,7 +218,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
ASTNode visitAssertStatement(AssertStatement node) {
if (identical(_oldNode, node.condition)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
@@ -232,7 +232,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
throw new InsufficientContextException();
} else if (identical(_oldNode, node.rightHandSide)) {
if (isCascadeAllowed(node)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return _parser.parseExpressionWithoutCascade();
}
@@ -422,7 +422,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
if (identical(_oldNode, node.parameter)) {
return _parser.parseNormalFormalParameter();
} else if (identical(_oldNode, node.defaultValue)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
@@ -431,7 +431,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
if (identical(_oldNode, node.body)) {
return _parser.parseStatement2();
} else if (identical(_oldNode, node.condition)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
@@ -457,14 +457,14 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
ASTNode visitExpressionFunctionBody(ExpressionFunctionBody node) {
if (identical(_oldNode, node.expression)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
ASTNode visitExpressionStatement(ExpressionStatement node) {
if (identical(_oldNode, node.expression)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
@@ -524,9 +524,9 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
} else if (identical(_oldNode, node.initialization)) {
throw new InsufficientContextException();
} else if (identical(_oldNode, node.condition)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
} else if (node.updaters.contains(_oldNode)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
} else if (identical(_oldNode, node.body)) {
return _parser.parseStatement2();
}
@@ -614,7 +614,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
ASTNode visitIfStatement(IfStatement node) {
if (identical(_oldNode, node.condition)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
} else if (identical(_oldNode, node.thenStatement)) {
return _parser.parseStatement2();
} else if (identical(_oldNode, node.elseStatement)) {
@@ -649,7 +649,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
if (identical(_oldNode, node.target)) {
throw new InsufficientContextException();
} else if (identical(_oldNode, node.index)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
@@ -670,7 +670,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
if (node.leftBracket == null) {
throw new InsufficientContextException();
}
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
@@ -726,7 +726,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
if (identical(_oldNode, node.typeArguments)) {
return _parser.parseTypeArgumentList();
} else if (node.elements.contains(_oldNode)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
@@ -742,9 +742,9 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
ASTNode visitMapLiteralEntry(MapLiteralEntry node) {
if (identical(_oldNode, node.key)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
} else if (identical(_oldNode, node.value)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
@@ -783,7 +783,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
if (identical(_oldNode, node.name)) {
return _parser.parseLabel();
} else if (identical(_oldNode, node.expression)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
@@ -806,7 +806,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
ASTNode visitParenthesizedExpression(ParenthesizedExpression node) {
if (identical(_oldNode, node.expression)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
@@ -878,7 +878,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
ASTNode visitReturnStatement(ReturnStatement node) {
if (identical(_oldNode, node.expression)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return notAChild(node);
}
@@ -931,7 +931,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
if (node.labels.contains(_oldNode)) {
return _parser.parseLabel();
} else if (identical(_oldNode, node.expression)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
} else if (node.statements.contains(_oldNode)) {
return _parser.parseStatement2();
}
@@ -949,7 +949,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
ASTNode visitSwitchStatement(SwitchStatement node) {
if (identical(_oldNode, node.expression)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
} else if (node.members.contains(_oldNode)) {
throw new InsufficientContextException();
}
@@ -963,7 +963,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
ASTNode visitThrowExpression(ThrowExpression node) {
if (identical(_oldNode, node.expression)) {
if (isCascadeAllowed2(node)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
}
return _parser.parseExpressionWithoutCascade();
}
@@ -1061,7 +1061,7 @@ class IncrementalParseDispatcher implements ASTVisitor<ASTNode> {
ASTNode visitWhileStatement(WhileStatement node) {
if (identical(_oldNode, node.condition)) {
- return _parser.parseExpression4();
+ return _parser.parseExpression2();
} else if (identical(_oldNode, node.body)) {
return _parser.parseStatement2();
}
@@ -1415,7 +1415,7 @@ class Parser {
InstrumentationBuilder instrumentation = Instrumentation.builder2("dart.engine.Parser.parseExpression");
try {
_currentToken = token;
- return parseExpression4();
+ return parseExpression2();
} finally {
instrumentation.log();
}
@@ -1510,9 +1510,9 @@ class Parser {
// have an identifier followed by a colon.
//
if (matchesIdentifier() && matches4(peek(), TokenType.COLON)) {
- return new NamedExpression(parseLabel(), parseExpression4());
+ return new NamedExpression(parseLabel(), parseExpression2());
} else {
- return parseExpression4();
+ return parseExpression2();
}
}
@@ -1550,7 +1550,7 @@ class Parser {
if (foundNamedArgument) {
if (!generatedError && argument is! NamedExpression) {
// Report the error, once, but allow the arguments to be in any order in the AST.
- reportError12(ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT, []);
+ reportError13(ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT, []);
generatedError = true;
}
} else if (argument is NamedExpression) {
@@ -1610,7 +1610,7 @@ class Parser {
}
if (identical(_currentToken, statementStart)) {
// Ensure that we are making progress and report an error if we're not.
- reportError13(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
}
statementStart = _currentToken;
@@ -1661,7 +1661,7 @@ class Parser {
//
// We appear to have a variable declaration with a type of "void".
//
- reportError11(ParserErrorCode.VOID_VARIABLE, returnType, []);
+ reportError12(ParserErrorCode.VOID_VARIABLE, returnType, []);
return parseInitializedIdentifierList(commentAndMetadata, modifiers.staticKeyword, validateModifiersForField(modifiers), returnType);
}
}
@@ -1672,7 +1672,7 @@ class Parser {
validateModifiersForOperator(modifiers);
return parseOperator(commentAndMetadata, modifiers.externalKeyword, returnType);
}
- reportError13(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
+ reportError14(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
return null;
}
} else if (matches(Keyword.GET) && matchesIdentifier2(peek())) {
@@ -1692,7 +1692,7 @@ class Parser {
validateModifiersForOperator(modifiers);
return parseOperator(commentAndMetadata, modifiers.externalKeyword, null);
}
- reportError13(ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken, []);
+ reportError14(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());
@@ -1707,7 +1707,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) {
- reportError12(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
+ reportError13(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
}
return parseInitializedIdentifierList(commentAndMetadata, modifiers.staticKeyword, validateModifiersForField(modifiers), null);
}
@@ -1742,7 +1742,7 @@ class Parser {
// At this point it consists of a type name, so we'll treat it as a field declaration
// with a missing field name and semicolon.
//
- reportError13(ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken, []);
+ reportError14(ParserErrorCode.EXPECTED_CLASS_MEMBER, _currentToken, []);
try {
lockErrorListener();
return parseInitializedIdentifierList(commentAndMetadata, modifiers.staticKeyword, validateModifiersForField(modifiers), type);
@@ -1753,7 +1753,7 @@ class Parser {
SimpleIdentifier methodName = parseSimpleIdentifier();
FormalParameterList parameters = parseFormalParameterList();
if (methodName.name == className) {
- reportError11(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, type, []);
+ reportError12(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, type, []);
return parseConstructor(commentAndMetadata, modifiers.externalKeyword, validateModifiersForConstructor(modifiers), modifiers.factoryKeyword, methodName, null, null, parameters);
}
validateModifiersForGetterOrSetterOrMethod(modifiers);
@@ -1807,15 +1807,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) {
- reportError12(ParserErrorCode.DIRECTIVE_AFTER_DECLARATION, []);
+ reportError13(ParserErrorCode.DIRECTIVE_AFTER_DECLARATION, []);
directiveFoundAfterDeclaration = true;
}
if (directive is LibraryDirective) {
if (libraryDirectiveFound) {
- reportError12(ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES, []);
+ reportError13(ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES, []);
} else {
if (directives.length > 0) {
- reportError13(ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST, directive.libraryToken, []);
+ reportError14(ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST, directive.libraryToken, []);
}
libraryDirectiveFound = true;
}
@@ -1823,29 +1823,29 @@ class Parser {
partDirectiveFound = true;
} else if (partDirectiveFound) {
if (directive is ExportDirective) {
- reportError13(ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, directive.keyword, []);
+ reportError14(ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, directive.keyword, []);
} else if (directive is ImportDirective) {
- reportError13(ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, directive.keyword, []);
+ reportError14(ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, directive.keyword, []);
}
}
if (directive is PartOfDirective) {
if (partOfDirectiveFound) {
- reportError12(ParserErrorCode.MULTIPLE_PART_OF_DIRECTIVES, []);
+ reportError13(ParserErrorCode.MULTIPLE_PART_OF_DIRECTIVES, []);
} else {
int directiveCount = directives.length;
for (int i = 0; i < directiveCount; i++) {
- reportError13(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directives[i].keyword, []);
+ reportError14(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directives[i].keyword, []);
}
partOfDirectiveFound = true;
}
} else {
if (partOfDirectiveFound) {
- reportError13(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directive.keyword, []);
+ reportError14(ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART, directive.keyword, []);
}
}
directives.add(directive);
} else if (matches5(TokenType.SEMICOLON)) {
- reportError13(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
} else {
CompilationUnitMember member = parseCompilationUnitMember(commentAndMetadata);
@@ -1854,7 +1854,7 @@ class Parser {
}
}
if (identical(_currentToken, memberStart)) {
- reportError13(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
while (!matches5(TokenType.EOF) && !couldBeStartOfCompilationUnitMember()) {
advance();
@@ -1920,7 +1920,7 @@ class Parser {
*
* @return the expression that was parsed
*/
- Expression parseExpression4() {
+ Expression parseExpression2() {
if (matches(Keyword.THROW)) {
return parseThrowExpression();
} else if (matches(Keyword.RETHROW)) {
@@ -1946,7 +1946,7 @@ class Parser {
} else if (tokenType.isAssignmentOperator) {
Token operator = andAdvance;
ensureAssignable(expression);
- return new AssignmentExpression(expression, operator, parseExpression4());
+ return new AssignmentExpression(expression, operator, parseExpression2());
}
return expression;
}
@@ -2056,9 +2056,9 @@ class Parser {
} else if (!optional(TokenType.COMMA)) {
// TODO(brianwilkerson) The token is wrong, we need to recover from this case.
if (getEndToken(leftParenthesis) != null) {
- reportError12(ParserErrorCode.EXPECTED_TOKEN, [TokenType.COMMA.lexeme]);
+ reportError13(ParserErrorCode.EXPECTED_TOKEN, [TokenType.COMMA.lexeme]);
} else {
- reportError13(ParserErrorCode.MISSING_CLOSING_PARENTHESIS, _currentToken.previous, []);
+ reportError14(ParserErrorCode.MISSING_CLOSING_PARENTHESIS, _currentToken.previous, []);
break;
}
}
@@ -2069,11 +2069,11 @@ class Parser {
if (matches5(TokenType.OPEN_SQUARE_BRACKET)) {
wasOptionalParameter = true;
if (leftSquareBracket != null && !reportedMuliplePositionalGroups) {
- reportError12(ParserErrorCode.MULTIPLE_POSITIONAL_PARAMETER_GROUPS, []);
+ reportError13(ParserErrorCode.MULTIPLE_POSITIONAL_PARAMETER_GROUPS, []);
reportedMuliplePositionalGroups = true;
}
if (leftCurlyBracket != null && !reportedMixedGroups) {
- reportError12(ParserErrorCode.MIXED_PARAMETER_GROUPS, []);
+ reportError13(ParserErrorCode.MIXED_PARAMETER_GROUPS, []);
reportedMixedGroups = true;
}
leftSquareBracket = andAdvance;
@@ -2082,11 +2082,11 @@ class Parser {
} else if (matches5(TokenType.OPEN_CURLY_BRACKET)) {
wasOptionalParameter = true;
if (leftCurlyBracket != null && !reportedMulipleNamedGroups) {
- reportError12(ParserErrorCode.MULTIPLE_NAMED_PARAMETER_GROUPS, []);
+ reportError13(ParserErrorCode.MULTIPLE_NAMED_PARAMETER_GROUPS, []);
reportedMulipleNamedGroups = true;
}
if (leftSquareBracket != null && !reportedMixedGroups) {
- reportError12(ParserErrorCode.MIXED_PARAMETER_GROUPS, []);
+ reportError13(ParserErrorCode.MIXED_PARAMETER_GROUPS, []);
reportedMixedGroups = true;
}
leftCurlyBracket = andAdvance;
@@ -2100,7 +2100,7 @@ class Parser {
parameters.add(parameter);
currentParameters.add(parameter);
if (identical(kind, ParameterKind.REQUIRED) && wasOptionalParameter) {
- reportError11(ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS, parameter, []);
+ reportError12(ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS, parameter, []);
}
//
// Handle the end of parameter groups.
@@ -2111,11 +2111,11 @@ class Parser {
currentParameters = normalParameters;
if (leftSquareBracket == null) {
if (leftCurlyBracket != null) {
- reportError12(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]);
+ reportError13(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]);
rightCurlyBracket = rightSquareBracket;
rightSquareBracket = null;
} else {
- reportError12(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["["]);
+ reportError13(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["["]);
}
}
kind = ParameterKind.REQUIRED;
@@ -2124,11 +2124,11 @@ class Parser {
currentParameters = normalParameters;
if (leftCurlyBracket == null) {
if (leftSquareBracket != null) {
- reportError12(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]);
+ reportError13(ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]);
rightSquareBracket = rightCurlyBracket;
rightCurlyBracket = null;
} else {
- reportError12(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["{"]);
+ reportError13(ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP, ["{"]);
}
}
kind = ParameterKind.REQUIRED;
@@ -2139,10 +2139,10 @@ class Parser {
// Check that the groups were closed correctly.
//
if (leftSquareBracket != null && rightSquareBracket == null) {
- reportError12(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]);
+ reportError13(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["]"]);
}
if (leftCurlyBracket != null && rightCurlyBracket == null) {
- reportError12(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]);
+ reportError13(ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP, ["}"]);
}
//
// Build the parameter list.
@@ -2259,9 +2259,9 @@ class Parser {
* @return the map literal entry that was parsed
*/
MapLiteralEntry parseMapLiteralEntry() {
- Expression key = parseExpression4();
+ Expression key = parseExpression2();
Token separator = expect2(TokenType.COLON);
- Expression value = parseExpression4();
+ Expression value = parseExpression2();
return new MapLiteralEntry(key, separator, value);
}
@@ -2301,7 +2301,7 @@ class Parser {
FormalParameterList parameters = parseFormalParameterList();
if (thisKeyword == null) {
if (holder.keyword != null) {
- reportError13(ParserErrorCode.FUNCTION_TYPED_PARAMETER_VAR, holder.keyword, []);
+ reportError14(ParserErrorCode.FUNCTION_TYPED_PARAMETER_VAR, holder.keyword, []);
}
return new FunctionTypedFormalParameter(commentAndMetadata.comment, commentAndMetadata.metadata, holder.type, identifier, parameters);
} else {
@@ -2311,9 +2311,9 @@ class Parser {
TypeName type = holder.type;
if (type != null) {
if (matches3(type.name.beginToken, Keyword.VOID)) {
- reportError13(ParserErrorCode.VOID_PARAMETER, type.name.beginToken, []);
+ reportError14(ParserErrorCode.VOID_PARAMETER, type.name.beginToken, []);
} else if (holder.keyword != null && matches3(holder.keyword, Keyword.VAR)) {
- reportError13(ParserErrorCode.VAR_AND_TYPE, holder.keyword, []);
+ reportError14(ParserErrorCode.VAR_AND_TYPE, holder.keyword, []);
}
}
if (thisKeyword != null) {
@@ -2375,7 +2375,7 @@ class Parser {
if (matchesIdentifier()) {
return new SimpleIdentifier(andAdvance);
}
- reportError12(ParserErrorCode.MISSING_IDENTIFIER, []);
+ reportError13(ParserErrorCode.MISSING_IDENTIFIER, []);
return createSyntheticIdentifier();
}
@@ -2423,7 +2423,7 @@ class Parser {
}
}
if (strings.length < 1) {
- reportError12(ParserErrorCode.EXPECTED_STRING_LITERAL, []);
+ reportError13(ParserErrorCode.EXPECTED_STRING_LITERAL, []);
return createSyntheticStringLiteral();
} else if (strings.length == 1) {
return strings[0];
@@ -2469,13 +2469,13 @@ class Parser {
TypeName parseTypeName() {
Identifier typeName;
if (matches(Keyword.VAR)) {
- reportError12(ParserErrorCode.VAR_AS_TYPE_NAME, []);
+ reportError13(ParserErrorCode.VAR_AS_TYPE_NAME, []);
typeName = new SimpleIdentifier(andAdvance);
} else if (matchesIdentifier()) {
typeName = parsePrefixedIdentifier();
} else {
typeName = createSyntheticIdentifier();
- reportError12(ParserErrorCode.EXPECTED_TYPE_NAME, []);
+ reportError13(ParserErrorCode.EXPECTED_TYPE_NAME, []);
}
TypeArgumentList typeArguments = null;
if (matches5(TokenType.LT)) {
@@ -2570,7 +2570,7 @@ 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)) {
- reportError12(ParserErrorCode.INVALID_CODE_POINT, [escapeSequence]);
+ reportError13(ParserErrorCode.INVALID_CODE_POINT, [escapeSequence]);
return;
}
if (scalarValue < Character.MAX_VALUE) {
@@ -2730,7 +2730,7 @@ class Parser {
*/
void ensureAssignable(Expression expression) {
if (expression != null && !expression.isAssignable) {
- reportError12(ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, []);
+ reportError13(ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, []);
}
}
@@ -2747,7 +2747,7 @@ class Parser {
}
// Remove uses of this method in favor of matches?
// Pass in the error code to use to report the error?
- reportError12(ParserErrorCode.EXPECTED_TOKEN, [keyword.syntax]);
+ reportError13(ParserErrorCode.EXPECTED_TOKEN, [keyword.syntax]);
return _currentToken;
}
@@ -2765,9 +2765,9 @@ class Parser {
// Remove uses of this method in favor of matches?
// Pass in the error code to use to report the error?
if (identical(type, TokenType.SEMICOLON)) {
- reportError13(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [type.lexeme]);
+ reportError14(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [type.lexeme]);
} else {
- reportError12(ParserErrorCode.EXPECTED_TOKEN, [type.lexeme]);
+ reportError13(ParserErrorCode.EXPECTED_TOKEN, [type.lexeme]);
}
return _currentToken;
}
@@ -3308,7 +3308,7 @@ class Parser {
ArgumentDefinitionTest parseArgumentDefinitionTest() {
Token question = expect2(TokenType.QUESTION);
SimpleIdentifier identifier = parseSimpleIdentifier();
- reportError13(ParserErrorCode.DEPRECATED_ARGUMENT_DEFINITION_TEST, question, []);
+ reportError14(ParserErrorCode.DEPRECATED_ARGUMENT_DEFINITION_TEST, question, []);
return new ArgumentDefinitionTest(question, identifier);
}
@@ -3325,15 +3325,15 @@ class Parser {
AssertStatement parseAssertStatement() {
Token keyword = expect(Keyword.ASSERT);
Token leftParen = expect2(TokenType.OPEN_PAREN);
- Expression expression = parseExpression4();
+ Expression expression = parseExpression2();
if (expression is AssignmentExpression) {
- reportError11(ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT, expression, []);
+ reportError12(ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT, expression, []);
} else if (expression is CascadeExpression) {
- reportError11(ParserErrorCode.ASSERT_DOES_NOT_TAKE_CASCADE, expression, []);
+ reportError12(ParserErrorCode.ASSERT_DOES_NOT_TAKE_CASCADE, expression, []);
} else if (expression is ThrowExpression) {
- reportError11(ParserErrorCode.ASSERT_DOES_NOT_TAKE_THROW, expression, []);
+ reportError12(ParserErrorCode.ASSERT_DOES_NOT_TAKE_THROW, expression, []);
} else if (expression is RethrowExpression) {
- reportError11(ParserErrorCode.ASSERT_DOES_NOT_TAKE_RETHROW, expression, []);
+ reportError12(ParserErrorCode.ASSERT_DOES_NOT_TAKE_RETHROW, expression, []);
}
Token rightParen = expect2(TokenType.CLOSE_PAREN);
Token semicolon = expect2(TokenType.SEMICOLON);
@@ -3412,7 +3412,7 @@ class Parser {
Expression parseAssignableSelector(Expression prefix, bool optional) {
if (matches5(TokenType.OPEN_SQUARE_BRACKET)) {
Token leftBracket = andAdvance;
- Expression index = parseExpression4();
+ Expression index = parseExpression2();
Token rightBracket = expect2(TokenType.CLOSE_SQUARE_BRACKET);
return new IndexExpression.forTarget(prefix, leftBracket, index, rightBracket);
} else if (matches5(TokenType.PERIOD)) {
@@ -3421,7 +3421,7 @@ class Parser {
} else {
if (!optional) {
// Report the missing selector.
- reportError12(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, []);
+ reportError13(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, []);
}
return prefix;
}
@@ -3494,7 +3494,7 @@ class Parser {
label = parseSimpleIdentifier();
}
if (!_inLoop && !_inSwitch && label == null) {
- reportError13(ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, breakKeyword, []);
+ reportError14(ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, breakKeyword, []);
}
Token semicolon = expect2(TokenType.SEMICOLON);
return new BreakStatement(breakKeyword, label, semicolon);
@@ -3525,12 +3525,12 @@ class Parser {
functionName = parseSimpleIdentifier();
} else if (identical(_currentToken.type, TokenType.OPEN_SQUARE_BRACKET)) {
Token leftBracket = andAdvance;
- Expression index = parseExpression4();
+ Expression index = parseExpression2();
Token rightBracket = expect2(TokenType.CLOSE_SQUARE_BRACKET);
expression = new IndexExpression.forCascade(period, leftBracket, index, rightBracket);
period = null;
} else {
- reportError13(ParserErrorCode.MISSING_IDENTIFIER, _currentToken, [_currentToken.lexeme]);
+ reportError14(ParserErrorCode.MISSING_IDENTIFIER, _currentToken, [_currentToken.lexeme]);
functionName = createSyntheticIdentifier();
}
if (identical(_currentToken.type, TokenType.OPEN_PAREN)) {
@@ -3621,29 +3621,29 @@ class Parser {
if (extendsClause == null) {
extendsClause = parseExtendsClause();
if (withClause != null) {
- reportError13(ParserErrorCode.WITH_BEFORE_EXTENDS, withClause.withKeyword, []);
+ reportError14(ParserErrorCode.WITH_BEFORE_EXTENDS, withClause.withKeyword, []);
} else if (implementsClause != null) {
- reportError13(ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS, implementsClause.keyword, []);
+ reportError14(ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS, implementsClause.keyword, []);
}
} else {
- reportError13(ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES, extendsClause.keyword, []);
+ reportError14(ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES, extendsClause.keyword, []);
parseExtendsClause();
}
} else if (matches(Keyword.WITH)) {
if (withClause == null) {
withClause = parseWithClause();
if (implementsClause != null) {
- reportError13(ParserErrorCode.IMPLEMENTS_BEFORE_WITH, implementsClause.keyword, []);
+ reportError14(ParserErrorCode.IMPLEMENTS_BEFORE_WITH, implementsClause.keyword, []);
}
} else {
- reportError13(ParserErrorCode.MULTIPLE_WITH_CLAUSES, withClause.withKeyword, []);
+ reportError14(ParserErrorCode.MULTIPLE_WITH_CLAUSES, withClause.withKeyword, []);
parseWithClause();
}
} else if (matches(Keyword.IMPLEMENTS)) {
if (implementsClause == null) {
implementsClause = parseImplementsClause();
} else {
- reportError13(ParserErrorCode.MULTIPLE_IMPLEMENTS_CLAUSES, implementsClause.keyword, []);
+ reportError14(ParserErrorCode.MULTIPLE_IMPLEMENTS_CLAUSES, implementsClause.keyword, []);
parseImplementsClause();
}
} else {
@@ -3651,7 +3651,7 @@ class Parser {
}
}
if (withClause != null && extendsClause == null) {
- reportError13(ParserErrorCode.WITH_WITHOUT_EXTENDS, withClause.withKeyword, []);
+ reportError14(ParserErrorCode.WITH_WITHOUT_EXTENDS, withClause.withKeyword, []);
}
//
// Look for and skip over the extra-lingual 'native' specification.
@@ -3673,7 +3673,7 @@ class Parser {
} else {
leftBracket = createSyntheticToken2(TokenType.OPEN_CURLY_BRACKET);
rightBracket = createSyntheticToken2(TokenType.CLOSE_CURLY_BRACKET);
- reportError12(ParserErrorCode.MISSING_CLASS_BODY, []);
+ reportError13(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;
@@ -3698,7 +3698,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)) {
- reportError13(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
} else {
ClassMember member = parseClassMember(className);
@@ -3707,7 +3707,7 @@ class Parser {
}
}
if (identical(_currentToken, memberStart)) {
- reportError13(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
}
memberStart = _currentToken;
@@ -3755,12 +3755,12 @@ class Parser {
semicolon = andAdvance;
} else {
if (matches5(TokenType.OPEN_CURLY_BRACKET)) {
- reportError12(ParserErrorCode.EXPECTED_TOKEN, [TokenType.SEMICOLON.lexeme]);
+ reportError13(ParserErrorCode.EXPECTED_TOKEN, [TokenType.SEMICOLON.lexeme]);
Token leftBracket = andAdvance;
parseClassMembers(className.name, getEndToken(leftBracket));
expect2(TokenType.CLOSE_CURLY_BRACKET);
} else {
- reportError13(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [TokenType.SEMICOLON.lexeme]);
+ reportError14(ParserErrorCode.EXPECTED_TOKEN, _currentToken.previous, [TokenType.SEMICOLON.lexeme]);
}
semicolon = createSyntheticToken2(TokenType.SEMICOLON);
}
@@ -3959,7 +3959,7 @@ class Parser {
validateModifiersForTopLevelFunction(modifiers);
return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, returnType);
} else if (matches(Keyword.OPERATOR) && isOperator(peek())) {
- reportError13(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
+ reportError14(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
return convertToFunctionDeclaration(parseOperator(commentAndMetadata, modifiers.externalKeyword, returnType));
} else if (matchesIdentifier() && matchesAny(peek(), [
TokenType.OPEN_PAREN,
@@ -3976,28 +3976,28 @@ class Parser {
//
// We appear to have a variable declaration with a type of "void".
//
- reportError11(ParserErrorCode.VOID_VARIABLE, returnType, []);
+ reportError12(ParserErrorCode.VOID_VARIABLE, returnType, []);
return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationList2(null, validateModifiersForTopLevelVariable(modifiers), null), expect2(TokenType.SEMICOLON));
}
}
- reportError13(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
+ reportError14(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())) {
- reportError13(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
+ reportError14(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
return convertToFunctionDeclaration(parseOperator(commentAndMetadata, modifiers.externalKeyword, null));
} else if (!matchesIdentifier()) {
- reportError13(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
+ reportError14(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) {
- reportError12(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
+ reportError13(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
}
return new TopLevelVariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, parseVariableDeclarationList2(null, validateModifiersForTopLevelVariable(modifiers), null), expect2(TokenType.SEMICOLON));
}
@@ -4006,13 +4006,13 @@ class Parser {
validateModifiersForTopLevelFunction(modifiers);
return parseFunctionDeclaration(commentAndMetadata, modifiers.externalKeyword, returnType);
} else if (matches(Keyword.OPERATOR) && isOperator(peek())) {
- reportError13(ParserErrorCode.TOP_LEVEL_OPERATOR, _currentToken, []);
+ reportError14(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()) {
// TODO(brianwilkerson) Generalize this error. We could also be parsing a top-level variable at this point.
- reportError13(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
+ reportError14(ParserErrorCode.EXPECTED_EXECUTABLE, _currentToken, []);
Token semicolon;
if (matches5(TokenType.SEMICOLON)) {
semicolon = andAdvance;
@@ -4089,21 +4089,21 @@ class Parser {
redirectedConstructor = parseConstructorName();
body = new EmptyFunctionBody(expect2(TokenType.SEMICOLON));
if (factoryKeyword == null) {
- reportError11(ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR, redirectedConstructor, []);
+ reportError12(ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR, redirectedConstructor, []);
}
} else {
body = parseFunctionBody(true, ParserErrorCode.MISSING_FUNCTION_BODY, false);
if (constKeyword != null && factoryKeyword != null && externalKeyword == null) {
- reportError13(ParserErrorCode.CONST_FACTORY, factoryKeyword, []);
+ reportError14(ParserErrorCode.CONST_FACTORY, factoryKeyword, []);
} else if (body is EmptyFunctionBody) {
if (factoryKeyword != null && externalKeyword == null) {
- reportError13(ParserErrorCode.FACTORY_WITHOUT_BODY, factoryKeyword, []);
+ reportError14(ParserErrorCode.FACTORY_WITHOUT_BODY, factoryKeyword, []);
}
} else {
if (constKeyword != null) {
- reportError11(ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, body, []);
+ reportError12(ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY, body, []);
} else if (!bodyAllowed) {
- reportError11(ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY, body, []);
+ reportError12(ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY, body, []);
}
}
}
@@ -4158,14 +4158,14 @@ class Parser {
Statement parseContinueStatement() {
Token continueKeyword = expect(Keyword.CONTINUE);
if (!_inLoop && !_inSwitch) {
- reportError13(ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, continueKeyword, []);
+ reportError14(ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, continueKeyword, []);
}
SimpleIdentifier label = null;
if (matchesIdentifier()) {
label = parseSimpleIdentifier();
}
if (_inSwitch && !_inLoop && label == null) {
- reportError13(ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE, continueKeyword, []);
+ reportError14(ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE, continueKeyword, []);
}
Token semicolon = expect2(TokenType.SEMICOLON);
return new ContinueStatement(continueKeyword, label, semicolon);
@@ -4257,7 +4257,7 @@ class Parser {
Statement body = parseStatement2();
Token whileKeyword = expect(Keyword.WHILE);
Token leftParenthesis = expect2(TokenType.OPEN_PAREN);
- Expression condition = parseExpression4();
+ Expression condition = parseExpression2();
Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
Token semicolon = expect2(TokenType.SEMICOLON);
return new DoStatement(doKeyword, body, whileKeyword, leftParenthesis, condition, rightParenthesis, semicolon);
@@ -4300,7 +4300,7 @@ class Parser {
while (_currentToken.type.isEqualityOperator) {
Token operator = andAdvance;
if (leftEqualityExpression) {
- reportError11(ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND, expression, []);
+ reportError12(ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND, expression, []);
}
expression = new BinaryExpression(expression, operator, parseRelationalExpression());
leftEqualityExpression = true;
@@ -4339,9 +4339,9 @@ class Parser {
*/
List<Expression> parseExpressionList() {
List<Expression> expressions = new List<Expression>();
- expressions.add(parseExpression4());
+ expressions.add(parseExpression2());
while (optional(TokenType.COMMA)) {
- expressions.add(parseExpression4());
+ expressions.add(parseExpression2());
}
return expressions;
}
@@ -4374,7 +4374,7 @@ class Parser {
if (isTypedIdentifier(_currentToken)) {
type = parseReturnType();
} else if (!optional) {
- reportError12(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
+ reportError13(ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, []);
}
}
return new FinalConstVarOrType(keyword, type);
@@ -4400,20 +4400,20 @@ class Parser {
NormalFormalParameter parameter = parseNormalFormalParameter();
if (matches5(TokenType.EQ)) {
Token seperator = andAdvance;
- Expression defaultValue = parseExpression4();
+ Expression defaultValue = parseExpression2();
if (identical(kind, ParameterKind.NAMED)) {
- reportError13(ParserErrorCode.WRONG_SEPARATOR_FOR_NAMED_PARAMETER, seperator, []);
+ reportError14(ParserErrorCode.WRONG_SEPARATOR_FOR_NAMED_PARAMETER, seperator, []);
} else if (identical(kind, ParameterKind.REQUIRED)) {
- reportError11(ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP, parameter, []);
+ reportError12(ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP, parameter, []);
}
return new DefaultFormalParameter(parameter, kind, seperator, defaultValue);
} else if (matches5(TokenType.COLON)) {
Token seperator = andAdvance;
- Expression defaultValue = parseExpression4();
+ Expression defaultValue = parseExpression2();
if (identical(kind, ParameterKind.POSITIONAL)) {
- reportError13(ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER, seperator, []);
+ reportError14(ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER, seperator, []);
} else if (identical(kind, ParameterKind.REQUIRED)) {
- reportError11(ParserErrorCode.NAMED_PARAMETER_OUTSIDE_GROUP, parameter, []);
+ reportError12(ParserErrorCode.NAMED_PARAMETER_OUTSIDE_GROUP, parameter, []);
}
return new DefaultFormalParameter(parameter, kind, seperator, defaultValue);
} else if (kind != ParameterKind.REQUIRED) {
@@ -4459,22 +4459,22 @@ class Parser {
} else if (isInitializedVariableDeclaration()) {
variableList = parseVariableDeclarationList(commentAndMetadata);
} else {
- initialization = parseExpression4();
+ initialization = parseExpression2();
}
if (matches(Keyword.IN)) {
DeclaredIdentifier loopVariable = null;
SimpleIdentifier identifier = null;
if (variableList == null) {
// We found: <expression> 'in'
- reportError12(ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH, []);
+ reportError13(ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH, []);
} else {
NodeList<VariableDeclaration> variables = variableList.variables;
if (variables.length > 1) {
- reportError12(ParserErrorCode.MULTIPLE_VARIABLES_IN_FOR_EACH, [variables.length.toString()]);
+ reportError13(ParserErrorCode.MULTIPLE_VARIABLES_IN_FOR_EACH, [variables.length.toString()]);
}
VariableDeclaration variable = variables[0];
if (variable.initializer != null) {
- reportError12(ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH, []);
+ reportError13(ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH, []);
}
Token keyword = variableList.keyword;
TypeName type = variableList.type;
@@ -4487,7 +4487,7 @@ class Parser {
}
}
Token inKeyword = expect(Keyword.IN);
- Expression iterator = parseExpression4();
+ Expression iterator = parseExpression2();
Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
Statement body = parseStatement2();
if (loopVariable == null) {
@@ -4499,7 +4499,7 @@ class Parser {
Token leftSeparator = expect2(TokenType.SEMICOLON);
Expression condition = null;
if (!matches5(TokenType.SEMICOLON)) {
- condition = parseExpression4();
+ condition = parseExpression2();
}
Token rightSeparator = expect2(TokenType.SEMICOLON);
List<Expression> updaters = null;
@@ -4541,12 +4541,12 @@ class Parser {
try {
if (matches5(TokenType.SEMICOLON)) {
if (!mayBeEmpty) {
- reportError12(emptyErrorCode, []);
+ reportError13(emptyErrorCode, []);
}
return new EmptyFunctionBody(andAdvance);
} else if (matches5(TokenType.FUNCTION)) {
Token functionDefinition = andAdvance;
- Expression expression = parseExpression4();
+ Expression expression = parseExpression2();
Token semicolon = null;
if (!inExpression) {
semicolon = expect2(TokenType.SEMICOLON);
@@ -4570,7 +4570,7 @@ class Parser {
return new NativeFunctionBody(nativeToken, stringLiteral, expect2(TokenType.SEMICOLON));
} else {
// Invalid function body
- reportError12(emptyErrorCode, []);
+ reportError13(emptyErrorCode, []);
return new EmptyFunctionBody(createSyntheticToken2(TokenType.SEMICOLON));
}
} finally {
@@ -4611,10 +4611,10 @@ class Parser {
parameters = parseFormalParameterList();
validateFormalParameterList(parameters);
} else {
- reportError12(ParserErrorCode.MISSING_FUNCTION_PARAMETERS, []);
+ reportError13(ParserErrorCode.MISSING_FUNCTION_PARAMETERS, []);
}
} else if (matches5(TokenType.OPEN_PAREN)) {
- reportError12(ParserErrorCode.GETTER_WITH_PARAMETERS, []);
+ reportError13(ParserErrorCode.GETTER_WITH_PARAMETERS, []);
parseFormalParameterList();
}
FunctionBody body;
@@ -4665,9 +4665,9 @@ class Parser {
Token propertyKeyword = declaration.propertyKeyword;
if (propertyKeyword != null) {
if (identical((propertyKeyword as KeywordToken).keyword, Keyword.GET)) {
- reportError13(ParserErrorCode.GETTER_IN_FUNCTION, propertyKeyword, []);
+ reportError14(ParserErrorCode.GETTER_IN_FUNCTION, propertyKeyword, []);
} else {
- reportError13(ParserErrorCode.SETTER_IN_FUNCTION, propertyKeyword, []);
+ reportError14(ParserErrorCode.SETTER_IN_FUNCTION, propertyKeyword, []);
}
}
return new FunctionDeclarationStatement(declaration);
@@ -4699,12 +4699,12 @@ class Parser {
typeParameters = parseTypeParameterList();
}
if (matches5(TokenType.SEMICOLON) || matches5(TokenType.EOF)) {
- reportError12(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []);
+ reportError13(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)) {
- reportError12(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []);
+ reportError13(ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, []);
// TODO(brianwilkerson) Recover from this error. At the very least we should skip to the start
// of the next valid compilation unit member, allowing for the possibility of finding the
// typedef parameters before that point.
@@ -4739,13 +4739,13 @@ class Parser {
Token propertyKeyword = expect(Keyword.GET);
SimpleIdentifier name = parseSimpleIdentifier();
if (matches5(TokenType.OPEN_PAREN) && matches4(peek(), TokenType.CLOSE_PAREN)) {
- reportError12(ParserErrorCode.GETTER_WITH_PARAMETERS, []);
+ reportError13(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) {
- reportError12(ParserErrorCode.EXTERNAL_GETTER_WITH_BODY, []);
+ reportError13(ParserErrorCode.EXTERNAL_GETTER_WITH_BODY, []);
}
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, staticKeyword, returnType, propertyKeyword, null, name, null, body);
}
@@ -4783,7 +4783,7 @@ class Parser {
Statement parseIfStatement() {
Token ifKeyword = expect(Keyword.IF);
Token leftParenthesis = expect2(TokenType.OPEN_PAREN);
- Expression condition = parseExpression4();
+ Expression condition = parseExpression2();
Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
Statement thenStatement = parseStatement2();
Token elseKeyword = null;
@@ -4903,9 +4903,9 @@ class Parser {
// TODO(brianwilkerson) Recovery: This should be extended to handle arbitrary tokens until we
// can find a token that can start a compilation unit member.
StringLiteral string = parseStringLiteral();
- reportError11(ParserErrorCode.NON_IDENTIFIER_LIBRARY_NAME, string, []);
+ reportError12(ParserErrorCode.NON_IDENTIFIER_LIBRARY_NAME, string, []);
} else {
- reportError13(missingNameError, missingNameToken, []);
+ reportError14(missingNameError, missingNameToken, []);
}
List<SimpleIdentifier> components = new List<SimpleIdentifier>();
components.add(createSyntheticIdentifier());
@@ -4944,12 +4944,12 @@ class Parser {
return new ListLiteral(modifier, typeArguments, leftBracket, null, andAdvance);
}
List<Expression> elements = new List<Expression>();
- elements.add(parseExpression4());
+ elements.add(parseExpression2());
while (optional(TokenType.COMMA)) {
if (matches5(TokenType.CLOSE_SQUARE_BRACKET)) {
return new ListLiteral(modifier, typeArguments, leftBracket, elements, andAdvance);
}
- elements.add(parseExpression4());
+ elements.add(parseExpression2());
}
Token rightBracket = expect2(TokenType.CLOSE_SQUARE_BRACKET);
return new ListLiteral(modifier, typeArguments, leftBracket, elements, rightBracket);
@@ -4978,7 +4978,7 @@ class Parser {
} else if (matches5(TokenType.OPEN_SQUARE_BRACKET) || matches5(TokenType.INDEX)) {
return parseListLiteral(modifier, typeArguments);
}
- reportError12(ParserErrorCode.EXPECTED_LIST_OR_MAP_LITERAL, []);
+ reportError13(ParserErrorCode.EXPECTED_LIST_OR_MAP_LITERAL, []);
return new ListLiteral(modifier, typeArguments, createSyntheticToken2(TokenType.OPEN_SQUARE_BRACKET), null, createSyntheticToken2(TokenType.CLOSE_SQUARE_BRACKET));
}
@@ -5077,11 +5077,11 @@ class Parser {
FunctionBody body = parseFunctionBody(externalKeyword != null || staticKeyword == null, ParserErrorCode.MISSING_FUNCTION_BODY, false);
if (externalKeyword != null) {
if (body is! EmptyFunctionBody) {
- reportError11(ParserErrorCode.EXTERNAL_METHOD_WITH_BODY, body, []);
+ reportError12(ParserErrorCode.EXTERNAL_METHOD_WITH_BODY, body, []);
}
} else if (staticKeyword != null) {
if (body is EmptyFunctionBody) {
- reportError11(ParserErrorCode.ABSTRACT_STATIC_METHOD, body, []);
+ reportError12(ParserErrorCode.ABSTRACT_STATIC_METHOD, body, []);
}
}
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, staticKeyword, returnType, null, null, name, parameters, body);
@@ -5109,49 +5109,49 @@ class Parser {
}
if (matches(Keyword.ABSTRACT)) {
if (modifiers.abstractKeyword != null) {
- reportError12(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportError13(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
advance();
} else {
modifiers.abstractKeyword = andAdvance;
}
} else if (matches(Keyword.CONST)) {
if (modifiers.constKeyword != null) {
- reportError12(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportError13(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) {
- reportError12(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportError13(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) {
- reportError12(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportError13(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
advance();
} else {
modifiers.factoryKeyword = andAdvance;
}
} else if (matches(Keyword.FINAL)) {
if (modifiers.finalKeyword != null) {
- reportError12(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportError13(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) {
- reportError12(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportError13(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
advance();
} else {
modifiers.staticKeyword = andAdvance;
}
} else if (matches(Keyword.VAR)) {
if (modifiers.varKeyword != null) {
- reportError12(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ reportError13(ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
advance();
} else {
modifiers.varKeyword = andAdvance;
@@ -5246,7 +5246,7 @@ class Parser {
if (matches4(peek(), TokenType.STRING)) {
Token afterString = skipStringLiteral(_currentToken.next);
if (afterString != null && identical(afterString.type, TokenType.COLON)) {
- return new ExpressionStatement(parseExpression4(), expect2(TokenType.SEMICOLON));
+ return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON));
}
}
return parseBlock();
@@ -5295,7 +5295,7 @@ class Parser {
//
// We appear to have a variable declaration with a type of "void".
//
- reportError11(ParserErrorCode.VOID_VARIABLE, returnType, []);
+ reportError12(ParserErrorCode.VOID_VARIABLE, returnType, []);
return parseVariableDeclarationStatement(commentAndMetadata);
}
} else if (matches5(TokenType.CLOSE_CURLY_BRACKET)) {
@@ -5305,7 +5305,7 @@ class Parser {
//
return parseVariableDeclarationStatement2(commentAndMetadata, null, returnType);
}
- reportError12(ParserErrorCode.MISSING_STATEMENT, []);
+ reportError13(ParserErrorCode.MISSING_STATEMENT, []);
// TODO(brianwilkerson) Recover from this error.
return new EmptyStatement(createSyntheticToken2(TokenType.SEMICOLON));
}
@@ -5315,23 +5315,23 @@ class Parser {
TokenType.OPEN_CURLY_BRACKET,
TokenType.OPEN_SQUARE_BRACKET,
TokenType.INDEX])) {
- return new ExpressionStatement(parseExpression4(), expect2(TokenType.SEMICOLON));
+ return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON));
} else if (matches4(peek(), TokenType.IDENTIFIER)) {
Token afterType = skipTypeName(peek());
if (afterType != null) {
if (matches4(afterType, TokenType.OPEN_PAREN) || (matches4(afterType, TokenType.PERIOD) && matches4(afterType.next, TokenType.IDENTIFIER) && matches4(afterType.next.next, TokenType.OPEN_PAREN))) {
- return new ExpressionStatement(parseExpression4(), expect2(TokenType.SEMICOLON));
+ return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON));
}
}
}
return parseVariableDeclarationStatement(commentAndMetadata);
} 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(parseExpression4(), expect2(TokenType.SEMICOLON));
+ return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON));
} else {
//
// We have found an error of some kind. Try to recover.
//
- reportError12(ParserErrorCode.MISSING_STATEMENT, []);
+ reportError13(ParserErrorCode.MISSING_STATEMENT, []);
return new EmptyStatement(createSyntheticToken2(TokenType.SEMICOLON));
}
} else if (matches5(TokenType.SEMICOLON)) {
@@ -5341,10 +5341,10 @@ class Parser {
} else if (isFunctionDeclaration()) {
return parseFunctionDeclarationStatement();
} else if (matches5(TokenType.CLOSE_CURLY_BRACKET)) {
- reportError12(ParserErrorCode.MISSING_STATEMENT, []);
+ reportError13(ParserErrorCode.MISSING_STATEMENT, []);
return new EmptyStatement(createSyntheticToken2(TokenType.SEMICOLON));
} else {
- return new ExpressionStatement(parseExpression4(), expect2(TokenType.SEMICOLON));
+ return new ExpressionStatement(parseExpression2(), expect2(TokenType.SEMICOLON));
}
}
@@ -5371,17 +5371,17 @@ class Parser {
if (matches(Keyword.OPERATOR)) {
operatorKeyword = andAdvance;
} else {
- reportError13(ParserErrorCode.MISSING_KEYWORD_OPERATOR, _currentToken, []);
+ reportError14(ParserErrorCode.MISSING_KEYWORD_OPERATOR, _currentToken, []);
operatorKeyword = createSyntheticToken(Keyword.OPERATOR);
}
if (!_currentToken.isUserDefinableOperator) {
- reportError12(ParserErrorCode.NON_USER_DEFINABLE_OPERATOR, [_currentToken.lexeme]);
+ reportError13(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) {
- reportError12(ParserErrorCode.INVALID_OPERATOR, ["${previous.lexeme}${_currentToken.lexeme}"]);
+ reportError13(ParserErrorCode.INVALID_OPERATOR, ["${previous.lexeme}${_currentToken.lexeme}"]);
advance();
}
}
@@ -5389,7 +5389,7 @@ class Parser {
validateFormalParameterList(parameters);
FunctionBody body = parseFunctionBody(true, ParserErrorCode.MISSING_FUNCTION_BODY, false);
if (externalKeyword != null && body is! EmptyFunctionBody) {
- reportError12(ParserErrorCode.EXTERNAL_OPERATOR_WITH_BODY, []);
+ reportError13(ParserErrorCode.EXTERNAL_OPERATOR_WITH_BODY, []);
}
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, null, returnType, null, operatorKeyword, name, parameters, body);
}
@@ -5474,7 +5474,7 @@ class Parser {
return operand;
}
if (operand is Literal || operand is FunctionExpressionInvocation) {
- reportError12(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, []);
+ reportError13(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, []);
}
Token operator = andAdvance;
return new PostfixExpression(operand, operator);
@@ -5569,7 +5569,7 @@ class Parser {
return parseFunctionExpression();
}
Token leftParenthesis = andAdvance;
- Expression expression = parseExpression4();
+ Expression expression = parseExpression2();
Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
return new ParenthesizedExpression(leftParenthesis, expression, rightParenthesis);
} else if (matches5(TokenType.LT)) {
@@ -5581,13 +5581,13 @@ class Parser {
// Recover from having a return type of "void" where a return type is not expected.
//
// TODO(brianwilkerson) Improve this error message.
- reportError12(ParserErrorCode.UNEXPECTED_TOKEN, [_currentToken.lexeme]);
+ reportError13(ParserErrorCode.UNEXPECTED_TOKEN, [_currentToken.lexeme]);
advance();
return parsePrimaryExpression();
} else if (matches5(TokenType.HASH)) {
return parseSymbolLiteral();
} else {
- reportError12(ParserErrorCode.MISSING_IDENTIFIER, []);
+ reportError13(ParserErrorCode.MISSING_IDENTIFIER, []);
return createSyntheticIdentifier();
}
}
@@ -5677,7 +5677,7 @@ class Parser {
if (matches5(TokenType.SEMICOLON)) {
return new ReturnStatement(returnKeyword, null, andAdvance);
}
- Expression expression = parseExpression4();
+ Expression expression = parseExpression2();
Token semicolon = expect2(TokenType.SEMICOLON);
return new ReturnStatement(returnKeyword, expression, semicolon);
}
@@ -5708,7 +5708,7 @@ class Parser {
validateFormalParameterList(parameters);
FunctionBody body = parseFunctionBody(externalKeyword != null || staticKeyword == null, ParserErrorCode.STATIC_SETTER_WITHOUT_BODY, false);
if (externalKeyword != null && body is! EmptyFunctionBody) {
- reportError12(ParserErrorCode.EXTERNAL_SETTER_WITH_BODY, []);
+ reportError13(ParserErrorCode.EXTERNAL_SETTER_WITH_BODY, []);
}
return new MethodDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, externalKeyword, staticKeyword, returnType, propertyKeyword, null, name, parameters, body);
}
@@ -5754,7 +5754,7 @@ class Parser {
while (!matches5(TokenType.EOF) && !matches5(TokenType.CLOSE_CURLY_BRACKET) && !isSwitchMember()) {
statements.add(parseStatement2());
if (identical(_currentToken, statementStart)) {
- reportError13(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
+ reportError14(ParserErrorCode.UNEXPECTED_TOKEN, _currentToken, [_currentToken.lexeme]);
advance();
}
statementStart = _currentToken;
@@ -5774,7 +5774,7 @@ class Parser {
while (hasMore) {
if (matches5(TokenType.STRING_INTERPOLATION_EXPRESSION)) {
Token openToken = andAdvance;
- Expression expression = parseExpression4();
+ Expression expression = parseExpression2();
Token rightBracket = expect2(TokenType.CLOSE_CURLY_BRACKET);
elements.add(new InterpolationExpression(openToken, expression, rightBracket));
} else {
@@ -5841,7 +5841,7 @@ class Parser {
Set<String> definedLabels = new Set<String>();
Token keyword = expect(Keyword.SWITCH);
Token leftParenthesis = expect2(TokenType.OPEN_PAREN);
- Expression expression = parseExpression4();
+ Expression expression = parseExpression2();
Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
Token leftBracket = expect2(TokenType.OPEN_CURLY_BRACKET);
Token defaultKeyword = null;
@@ -5852,7 +5852,7 @@ class Parser {
SimpleIdentifier identifier = parseSimpleIdentifier();
String label = identifier.token.lexeme;
if (definedLabels.contains(label)) {
- reportError13(ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT, identifier.token, [label]);
+ reportError14(ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT, identifier.token, [label]);
} else {
definedLabels.add(label);
}
@@ -5861,15 +5861,15 @@ class Parser {
}
if (matches(Keyword.CASE)) {
Token caseKeyword = andAdvance;
- Expression caseExpression = parseExpression4();
+ Expression caseExpression = parseExpression2();
Token colon = expect2(TokenType.COLON);
members.add(new SwitchCase(labels, caseKeyword, caseExpression, colon, parseStatements2()));
if (defaultKeyword != null) {
- reportError13(ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE, caseKeyword, []);
+ reportError14(ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE, caseKeyword, []);
}
} else if (matches(Keyword.DEFAULT)) {
if (defaultKeyword != null) {
- reportError13(ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES, peek(), []);
+ reportError14(ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES, peek(), []);
}
defaultKeyword = andAdvance;
Token colon = expect2(TokenType.COLON);
@@ -5877,7 +5877,7 @@ class Parser {
} else {
// We need to advance, otherwise we could end up in an infinite loop, but this could be a
// lot smarter about recovering from the error.
- reportError12(ParserErrorCode.EXPECTED_CASE_OR_DEFAULT, []);
+ reportError13(ParserErrorCode.EXPECTED_CASE_OR_DEFAULT, []);
while (!matches5(TokenType.EOF) && !matches5(TokenType.CLOSE_CURLY_BRACKET) && !matches(Keyword.CASE) && !matches(Keyword.DEFAULT)) {
advance();
}
@@ -5910,7 +5910,7 @@ class Parser {
if (matchesIdentifier()) {
components.add(andAdvance);
} else {
- reportError12(ParserErrorCode.MISSING_IDENTIFIER, []);
+ reportError13(ParserErrorCode.MISSING_IDENTIFIER, []);
components.add(createSyntheticToken2(TokenType.IDENTIFIER));
break;
}
@@ -5918,7 +5918,7 @@ class Parser {
} else if (_currentToken.isOperator) {
components.add(andAdvance);
} else {
- reportError12(ParserErrorCode.MISSING_IDENTIFIER, []);
+ reportError13(ParserErrorCode.MISSING_IDENTIFIER, []);
components.add(createSyntheticToken2(TokenType.IDENTIFIER));
}
return new SymbolLiteral(poundSign, new List.from(components));
@@ -5937,10 +5937,10 @@ class Parser {
Expression parseThrowExpression() {
Token keyword = expect(Keyword.THROW);
if (matches5(TokenType.SEMICOLON) || matches5(TokenType.CLOSE_PAREN)) {
- reportError13(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []);
+ reportError14(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []);
return new ThrowExpression(keyword, createSyntheticIdentifier());
}
- Expression expression = parseExpression4();
+ Expression expression = parseExpression2();
return new ThrowExpression(keyword, expression);
}
@@ -5957,7 +5957,7 @@ class Parser {
Expression parseThrowExpressionWithoutCascade() {
Token keyword = expect(Keyword.THROW);
if (matches5(TokenType.SEMICOLON) || matches5(TokenType.CLOSE_PAREN)) {
- reportError13(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []);
+ reportError14(ParserErrorCode.MISSING_EXPRESSION_IN_THROW, _currentToken, []);
return new ThrowExpression(keyword, createSyntheticIdentifier());
}
Expression expression = parseExpressionWithoutCascade();
@@ -6021,7 +6021,7 @@ class Parser {
finallyClause = parseBlock();
} else {
if (catchClauses.isEmpty) {
- reportError12(ParserErrorCode.MISSING_CATCH_OR_FINALLY, []);
+ reportError13(ParserErrorCode.MISSING_CATCH_OR_FINALLY, []);
}
}
return new TryStatement(tryKeyword, body, catchClauses, finallyKeyword, finallyClause);
@@ -6062,12 +6062,12 @@ class Parser {
next = skipTypeParameterList(next);
if (next != null && matches4(next, TokenType.EQ)) {
TypeAlias typeAlias = parseClassTypeAlias(commentAndMetadata, null, keyword);
- reportError13(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []);
+ reportError14(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []);
return typeAlias;
}
} else if (matches4(next, TokenType.EQ)) {
TypeAlias typeAlias = parseClassTypeAlias(commentAndMetadata, null, keyword);
- reportError13(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []);
+ reportError14(ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS, keyword, []);
return typeAlias;
}
}
@@ -6124,13 +6124,13 @@ class Parser {
return new PrefixExpression(firstOperator, new PrefixExpression(secondOperator, new SuperExpression(andAdvance)));
} else {
// Invalid operator before 'super'
- reportError12(ParserErrorCode.INVALID_OPERATOR_FOR_SUPER, [operator.lexeme]);
+ reportError13(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)) {
- reportError12(ParserErrorCode.MISSING_IDENTIFIER, []);
+ reportError13(ParserErrorCode.MISSING_IDENTIFIER, []);
return createSyntheticIdentifier();
}
return parsePostfixExpression();
@@ -6153,7 +6153,7 @@ class Parser {
Expression initializer = null;
if (matches5(TokenType.EQ)) {
equals = andAdvance;
- initializer = parseExpression4();
+ initializer = parseExpression2();
}
return new VariableDeclaration(commentAndMetadata.comment, commentAndMetadata.metadata, name, equals, initializer);
}
@@ -6191,7 +6191,7 @@ class Parser {
*/
VariableDeclarationList parseVariableDeclarationList2(CommentAndMetadata commentAndMetadata, Token keyword, TypeName type) {
if (type != null && keyword != null && matches3(keyword, Keyword.VAR)) {
- reportError13(ParserErrorCode.VAR_AND_TYPE, keyword, []);
+ reportError14(ParserErrorCode.VAR_AND_TYPE, keyword, []);
}
List<VariableDeclaration> variables = new List<VariableDeclaration>();
variables.add(parseVariableDeclaration());
@@ -6264,7 +6264,7 @@ class Parser {
try {
Token keyword = expect(Keyword.WHILE);
Token leftParenthesis = expect2(TokenType.OPEN_PAREN);
- Expression condition = parseExpression4();
+ Expression condition = parseExpression2();
Token rightParenthesis = expect2(TokenType.CLOSE_PAREN);
Statement body = parseStatement2();
return new WhileStatement(keyword, leftParenthesis, condition, rightParenthesis, body);
@@ -6315,7 +6315,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 reportError11(ParserErrorCode errorCode, ASTNode node, List<Object> arguments) {
+ void reportError12(ParserErrorCode errorCode, ASTNode node, List<Object> arguments) {
reportError(new AnalysisError.con2(_source, node.offset, node.length, errorCode, arguments));
}
@@ -6325,8 +6325,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 reportError12(ParserErrorCode errorCode, List<Object> arguments) {
- reportError13(errorCode, _currentToken, arguments);
+ void reportError13(ParserErrorCode errorCode, List<Object> arguments) {
+ reportError14(errorCode, _currentToken, arguments);
}
/**
@@ -6336,7 +6336,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 reportError13(ParserErrorCode errorCode, Token token, List<Object> arguments) {
+ void reportError14(ParserErrorCode errorCode, Token token, List<Object> arguments) {
reportError(new AnalysisError.con2(_source, token.offset, token.length, errorCode, arguments));
}
@@ -6817,14 +6817,14 @@ class Parser {
} else if (currentChar == 0x78) {
if (currentIndex + 2 >= length) {
// Illegal escape sequence: not enough hex digits
- reportError12(ParserErrorCode.INVALID_HEX_ESCAPE, []);
+ reportError13(ParserErrorCode.INVALID_HEX_ESCAPE, []);
return length;
}
int firstDigit = lexeme.codeUnitAt(currentIndex + 1);
int secondDigit = lexeme.codeUnitAt(currentIndex + 2);
if (!isHexDigit(firstDigit) || !isHexDigit(secondDigit)) {
// Illegal escape sequence: invalid hex digit
- reportError12(ParserErrorCode.INVALID_HEX_ESCAPE, []);
+ reportError13(ParserErrorCode.INVALID_HEX_ESCAPE, []);
} else {
builder.appendChar(((Character.digit(firstDigit, 16) << 4) + Character.digit(secondDigit, 16)));
}
@@ -6833,7 +6833,7 @@ class Parser {
currentIndex++;
if (currentIndex >= length) {
// Illegal escape sequence: not enough hex digits
- reportError12(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
return length;
}
currentChar = lexeme.codeUnitAt(currentIndex);
@@ -6841,7 +6841,7 @@ class Parser {
currentIndex++;
if (currentIndex >= length) {
// Illegal escape sequence: incomplete escape
- reportError12(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
return length;
}
currentChar = lexeme.codeUnitAt(currentIndex);
@@ -6850,7 +6850,7 @@ class Parser {
while (currentChar != 0x7D) {
if (!isHexDigit(currentChar)) {
// Illegal escape sequence: invalid hex digit
- reportError12(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
currentIndex++;
while (currentIndex < length && lexeme.codeUnitAt(currentIndex) != 0x7D) {
currentIndex++;
@@ -6862,21 +6862,21 @@ class Parser {
currentIndex++;
if (currentIndex >= length) {
// Illegal escape sequence: incomplete escape
- reportError12(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
return length;
}
currentChar = lexeme.codeUnitAt(currentIndex);
}
if (digitCount < 1 || digitCount > 6) {
// Illegal escape sequence: not enough or too many hex digits
- reportError12(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
}
appendScalarValue(builder, lexeme.substring(index, currentIndex + 1), value, index, currentIndex);
return currentIndex + 1;
} else {
if (currentIndex + 3 >= length) {
// Illegal escape sequence: not enough hex digits
- reportError12(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportError13(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
return length;
}
int firstDigit = currentChar;
@@ -6885,7 +6885,7 @@ class Parser {
int fourthDigit = lexeme.codeUnitAt(currentIndex + 3);
if (!isHexDigit(firstDigit) || !isHexDigit(secondDigit) || !isHexDigit(thirdDigit) || !isHexDigit(fourthDigit)) {
// Illegal escape sequence: invalid hex digits
- reportError12(ParserErrorCode.INVALID_UNICODE_ESCAPE, []);
+ reportError13(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);
}
@@ -6916,7 +6916,7 @@ class Parser {
void validateFormalParameterList(FormalParameterList parameterList) {
for (FormalParameter parameter in parameterList.parameters) {
if (parameter is FieldFormalParameter) {
- reportError11(ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, parameter.identifier, []);
+ reportError12(ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, parameter.identifier, []);
}
}
}
@@ -6930,16 +6930,16 @@ class Parser {
Token validateModifiersForClass(Modifiers modifiers) {
validateModifiersForTopLevelDeclaration(modifiers);
if (modifiers.constKeyword != null) {
- reportError13(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []);
+ reportError14(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []);
}
if (modifiers.externalKeyword != null) {
- reportError13(ParserErrorCode.EXTERNAL_CLASS, modifiers.externalKeyword, []);
+ reportError14(ParserErrorCode.EXTERNAL_CLASS, modifiers.externalKeyword, []);
}
if (modifiers.finalKeyword != null) {
- reportError13(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []);
+ reportError14(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError13(ParserErrorCode.VAR_CLASS, modifiers.varKeyword, []);
+ reportError14(ParserErrorCode.VAR_CLASS, modifiers.varKeyword, []);
}
return modifiers.abstractKeyword;
}
@@ -6953,25 +6953,25 @@ class Parser {
*/
Token validateModifiersForConstructor(Modifiers modifiers) {
if (modifiers.abstractKeyword != null) {
- reportError12(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
+ reportError13(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
}
if (modifiers.finalKeyword != null) {
- reportError13(ParserErrorCode.FINAL_CONSTRUCTOR, modifiers.finalKeyword, []);
+ reportError14(ParserErrorCode.FINAL_CONSTRUCTOR, modifiers.finalKeyword, []);
}
if (modifiers.staticKeyword != null) {
- reportError13(ParserErrorCode.STATIC_CONSTRUCTOR, modifiers.staticKeyword, []);
+ reportError14(ParserErrorCode.STATIC_CONSTRUCTOR, modifiers.staticKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError13(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, modifiers.varKeyword, []);
+ reportError14(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) {
- reportError13(ParserErrorCode.EXTERNAL_AFTER_CONST, externalKeyword, []);
+ reportError14(ParserErrorCode.EXTERNAL_AFTER_CONST, externalKeyword, []);
}
if (externalKeyword != null && factoryKeyword != null && factoryKeyword.offset < externalKeyword.offset) {
- reportError13(ParserErrorCode.EXTERNAL_AFTER_FACTORY, externalKeyword, []);
+ reportError14(ParserErrorCode.EXTERNAL_AFTER_FACTORY, externalKeyword, []);
}
return constKeyword;
}
@@ -6985,13 +6985,13 @@ class Parser {
*/
Token validateModifiersForField(Modifiers modifiers) {
if (modifiers.abstractKeyword != null) {
- reportError12(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
+ reportError13(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
}
if (modifiers.externalKeyword != null) {
- reportError13(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []);
+ reportError14(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []);
}
if (modifiers.factoryKeyword != null) {
- reportError13(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
+ reportError14(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
}
Token staticKeyword = modifiers.staticKeyword;
Token constKeyword = modifiers.constKeyword;
@@ -6999,23 +6999,23 @@ class Parser {
Token varKeyword = modifiers.varKeyword;
if (constKeyword != null) {
if (finalKeyword != null) {
- reportError13(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []);
+ reportError14(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []);
}
if (varKeyword != null) {
- reportError13(ParserErrorCode.CONST_AND_VAR, varKeyword, []);
+ reportError14(ParserErrorCode.CONST_AND_VAR, varKeyword, []);
}
if (staticKeyword != null && constKeyword.offset < staticKeyword.offset) {
- reportError13(ParserErrorCode.STATIC_AFTER_CONST, staticKeyword, []);
+ reportError14(ParserErrorCode.STATIC_AFTER_CONST, staticKeyword, []);
}
} else if (finalKeyword != null) {
if (varKeyword != null) {
- reportError13(ParserErrorCode.FINAL_AND_VAR, varKeyword, []);
+ reportError14(ParserErrorCode.FINAL_AND_VAR, varKeyword, []);
}
if (staticKeyword != null && finalKeyword.offset < staticKeyword.offset) {
- reportError13(ParserErrorCode.STATIC_AFTER_FINAL, staticKeyword, []);
+ reportError14(ParserErrorCode.STATIC_AFTER_FINAL, staticKeyword, []);
}
} else if (varKeyword != null && staticKeyword != null && varKeyword.offset < staticKeyword.offset) {
- reportError13(ParserErrorCode.STATIC_AFTER_VAR, staticKeyword, []);
+ reportError14(ParserErrorCode.STATIC_AFTER_VAR, staticKeyword, []);
}
return lexicallyFirst([constKeyword, finalKeyword, varKeyword]);
}
@@ -7027,7 +7027,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) {
- reportError12(ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER, []);
+ reportError13(ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER, []);
}
}
@@ -7038,24 +7038,24 @@ class Parser {
*/
void validateModifiersForGetterOrSetterOrMethod(Modifiers modifiers) {
if (modifiers.abstractKeyword != null) {
- reportError12(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
+ reportError13(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
}
if (modifiers.constKeyword != null) {
- reportError13(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []);
+ reportError14(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []);
}
if (modifiers.factoryKeyword != null) {
- reportError13(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
+ reportError14(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
}
if (modifiers.finalKeyword != null) {
- reportError13(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []);
+ reportError14(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError13(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
+ reportError14(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
}
Token externalKeyword = modifiers.externalKeyword;
Token staticKeyword = modifiers.staticKeyword;
if (externalKeyword != null && staticKeyword != null && staticKeyword.offset < externalKeyword.offset) {
- reportError13(ParserErrorCode.EXTERNAL_AFTER_STATIC, externalKeyword, []);
+ reportError14(ParserErrorCode.EXTERNAL_AFTER_STATIC, externalKeyword, []);
}
}
@@ -7066,22 +7066,22 @@ class Parser {
*/
void validateModifiersForOperator(Modifiers modifiers) {
if (modifiers.abstractKeyword != null) {
- reportError12(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
+ reportError13(ParserErrorCode.ABSTRACT_CLASS_MEMBER, []);
}
if (modifiers.constKeyword != null) {
- reportError13(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []);
+ reportError14(ParserErrorCode.CONST_METHOD, modifiers.constKeyword, []);
}
if (modifiers.factoryKeyword != null) {
- reportError13(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
+ reportError14(ParserErrorCode.NON_CONSTRUCTOR_FACTORY, modifiers.factoryKeyword, []);
}
if (modifiers.finalKeyword != null) {
- reportError13(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []);
+ reportError14(ParserErrorCode.FINAL_METHOD, modifiers.finalKeyword, []);
}
if (modifiers.staticKeyword != null) {
- reportError13(ParserErrorCode.STATIC_OPERATOR, modifiers.staticKeyword, []);
+ reportError14(ParserErrorCode.STATIC_OPERATOR, modifiers.staticKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError13(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
+ reportError14(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
}
}
@@ -7092,10 +7092,10 @@ class Parser {
*/
void validateModifiersForTopLevelDeclaration(Modifiers modifiers) {
if (modifiers.factoryKeyword != null) {
- reportError13(ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION, modifiers.factoryKeyword, []);
+ reportError14(ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION, modifiers.factoryKeyword, []);
}
if (modifiers.staticKeyword != null) {
- reportError13(ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION, modifiers.staticKeyword, []);
+ reportError14(ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION, modifiers.staticKeyword, []);
}
}
@@ -7107,16 +7107,16 @@ class Parser {
void validateModifiersForTopLevelFunction(Modifiers modifiers) {
validateModifiersForTopLevelDeclaration(modifiers);
if (modifiers.abstractKeyword != null) {
- reportError12(ParserErrorCode.ABSTRACT_TOP_LEVEL_FUNCTION, []);
+ reportError13(ParserErrorCode.ABSTRACT_TOP_LEVEL_FUNCTION, []);
}
if (modifiers.constKeyword != null) {
- reportError13(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []);
+ reportError14(ParserErrorCode.CONST_CLASS, modifiers.constKeyword, []);
}
if (modifiers.finalKeyword != null) {
- reportError13(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []);
+ reportError14(ParserErrorCode.FINAL_CLASS, modifiers.finalKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError13(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
+ reportError14(ParserErrorCode.VAR_RETURN_TYPE, modifiers.varKeyword, []);
}
}
@@ -7130,24 +7130,24 @@ class Parser {
Token validateModifiersForTopLevelVariable(Modifiers modifiers) {
validateModifiersForTopLevelDeclaration(modifiers);
if (modifiers.abstractKeyword != null) {
- reportError12(ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE, []);
+ reportError13(ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE, []);
}
if (modifiers.externalKeyword != null) {
- reportError13(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []);
+ reportError14(ParserErrorCode.EXTERNAL_FIELD, modifiers.externalKeyword, []);
}
Token constKeyword = modifiers.constKeyword;
Token finalKeyword = modifiers.finalKeyword;
Token varKeyword = modifiers.varKeyword;
if (constKeyword != null) {
if (finalKeyword != null) {
- reportError13(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []);
+ reportError14(ParserErrorCode.CONST_AND_FINAL, finalKeyword, []);
}
if (varKeyword != null) {
- reportError13(ParserErrorCode.CONST_AND_VAR, varKeyword, []);
+ reportError14(ParserErrorCode.CONST_AND_VAR, varKeyword, []);
}
} else if (finalKeyword != null) {
if (varKeyword != null) {
- reportError13(ParserErrorCode.FINAL_AND_VAR, varKeyword, []);
+ reportError14(ParserErrorCode.FINAL_AND_VAR, varKeyword, []);
}
}
return lexicallyFirst([constKeyword, finalKeyword, varKeyword]);
@@ -7162,19 +7162,19 @@ class Parser {
void validateModifiersForTypedef(Modifiers modifiers) {
validateModifiersForTopLevelDeclaration(modifiers);
if (modifiers.abstractKeyword != null) {
- reportError13(ParserErrorCode.ABSTRACT_TYPEDEF, modifiers.abstractKeyword, []);
+ reportError14(ParserErrorCode.ABSTRACT_TYPEDEF, modifiers.abstractKeyword, []);
}
if (modifiers.constKeyword != null) {
- reportError13(ParserErrorCode.CONST_TYPEDEF, modifiers.constKeyword, []);
+ reportError14(ParserErrorCode.CONST_TYPEDEF, modifiers.constKeyword, []);
}
if (modifiers.externalKeyword != null) {
- reportError13(ParserErrorCode.EXTERNAL_TYPEDEF, modifiers.externalKeyword, []);
+ reportError14(ParserErrorCode.EXTERNAL_TYPEDEF, modifiers.externalKeyword, []);
}
if (modifiers.finalKeyword != null) {
- reportError13(ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword, []);
+ reportError14(ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword, []);
}
if (modifiers.varKeyword != null) {
- reportError13(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword, []);
+ reportError14(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword, []);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698