| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.parser; | 8 library engine.parser; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } else if (identical(_oldNode, node.rightHandSide)) { | 150 } else if (identical(_oldNode, node.rightHandSide)) { |
| 151 if (_isCascadeAllowedInAssignment(node)) { | 151 if (_isCascadeAllowedInAssignment(node)) { |
| 152 return _parser.parseExpression2(); | 152 return _parser.parseExpression2(); |
| 153 } | 153 } |
| 154 return _parser.parseExpressionWithoutCascade(); | 154 return _parser.parseExpressionWithoutCascade(); |
| 155 } | 155 } |
| 156 return _notAChild(node); | 156 return _notAChild(node); |
| 157 } | 157 } |
| 158 | 158 |
| 159 @override | 159 @override |
| 160 AstNode visitAwaitExpression(AwaitExpression node) { |
| 161 if (identical(_oldNode, node.expression)) { |
| 162 // TODO(brianwilkerson) Depending on precedence, this might not be suffici
ent. |
| 163 return _parser.parseExpression2(); |
| 164 } |
| 165 return _notAChild(node); |
| 166 } |
| 167 |
| 168 @override |
| 160 AstNode visitBinaryExpression(BinaryExpression node) { | 169 AstNode visitBinaryExpression(BinaryExpression node) { |
| 161 if (identical(_oldNode, node.leftOperand)) { | 170 if (identical(_oldNode, node.leftOperand)) { |
| 162 throw new InsufficientContextException(); | 171 throw new InsufficientContextException(); |
| 163 } else if (identical(_oldNode, node.rightOperand)) { | 172 } else if (identical(_oldNode, node.rightOperand)) { |
| 164 throw new InsufficientContextException(); | 173 throw new InsufficientContextException(); |
| 165 } | 174 } |
| 166 return _notAChild(node); | 175 return _notAChild(node); |
| 167 } | 176 } |
| 168 | 177 |
| 169 @override | 178 @override |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 } | 1094 } |
| 1086 | 1095 |
| 1087 @override | 1096 @override |
| 1088 AstNode visitWithClause(WithClause node) { | 1097 AstNode visitWithClause(WithClause node) { |
| 1089 if (node.mixinTypes.contains(node)) { | 1098 if (node.mixinTypes.contains(node)) { |
| 1090 return _parser.parseTypeName(); | 1099 return _parser.parseTypeName(); |
| 1091 } | 1100 } |
| 1092 return _notAChild(node); | 1101 return _notAChild(node); |
| 1093 } | 1102 } |
| 1094 | 1103 |
| 1104 @override |
| 1105 AstNode visitYieldStatement(YieldStatement node) { |
| 1106 if (identical(_oldNode, node.expression)) { |
| 1107 return _parser.parseExpression2(); |
| 1108 } |
| 1109 return _notAChild(node); |
| 1110 } |
| 1111 |
| 1095 /** | 1112 /** |
| 1096 * Return `true` if the given assignment expression can have a cascade express
ion on the | 1113 * Return `true` if the given assignment expression can have a cascade express
ion on the |
| 1097 * right-hand side. | 1114 * right-hand side. |
| 1098 * | 1115 * |
| 1099 * @param node the assignment expression being tested | 1116 * @param node the assignment expression being tested |
| 1100 * @return `true` if the right-hand side can be a cascade expression | 1117 * @return `true` if the right-hand side can be a cascade expression |
| 1101 */ | 1118 */ |
| 1102 bool _isCascadeAllowedInAssignment(AssignmentExpression node) { | 1119 bool _isCascadeAllowedInAssignment(AssignmentExpression node) { |
| 1103 // TODO(brianwilkerson) Implement this method. | 1120 // TODO(brianwilkerson) Implement this method. |
| 1104 throw new InsufficientContextException(); | 1121 throw new InsufficientContextException(); |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 * An [errorListener] lock, if more than `0`, then errors are not reported. | 1447 * An [errorListener] lock, if more than `0`, then errors are not reported. |
| 1431 */ | 1448 */ |
| 1432 int _errorListenerLock = 0; | 1449 int _errorListenerLock = 0; |
| 1433 | 1450 |
| 1434 /** | 1451 /** |
| 1435 * A flag indicating whether parser is to parse function bodies. | 1452 * A flag indicating whether parser is to parse function bodies. |
| 1436 */ | 1453 */ |
| 1437 bool _parseFunctionBodies = true; | 1454 bool _parseFunctionBodies = true; |
| 1438 | 1455 |
| 1439 /** | 1456 /** |
| 1440 * A flag indicating whether parser is to parse deferred libraries. | 1457 * A flag indicating whether the parser is to parse deferred libraries. |
| 1441 */ | 1458 */ |
| 1442 bool _parseDeferredLibraries = AnalysisOptionsImpl.DEFAULT_ENABLE_DEFERRED_LOA
DING; | 1459 bool _parseDeferredLibraries = AnalysisOptionsImpl.DEFAULT_ENABLE_DEFERRED_LOA
DING; |
| 1443 | 1460 |
| 1444 /** | 1461 /** |
| 1462 * A flag indicating whether the parser is to parse the async support. |
| 1463 */ |
| 1464 bool _parseAsync = AnalysisOptionsImpl.DEFAULT_ENABLE_ASYNC; |
| 1465 |
| 1466 /** |
| 1445 * The next token to be parsed. | 1467 * The next token to be parsed. |
| 1446 */ | 1468 */ |
| 1447 Token _currentToken; | 1469 Token _currentToken; |
| 1448 | 1470 |
| 1449 /** | 1471 /** |
| 1450 * A flag indicating whether the parser is currently in the body of a loop. | 1472 * A flag indicating whether the parser is currently in the body of a loop. |
| 1451 */ | 1473 */ |
| 1452 bool _inLoop = false; | 1474 bool _inLoop = false; |
| 1453 | 1475 |
| 1454 /** | 1476 /** |
| 1455 * A flag indicating whether the parser is currently in a switch statement. | 1477 * A flag indicating whether the parser is currently in a switch statement. |
| 1456 */ | 1478 */ |
| 1457 bool _inSwitch = false; | 1479 bool _inSwitch = false; |
| 1458 | 1480 |
| 1459 /** | 1481 /** |
| 1460 * A flag indicating whether the parser is currently in a constructor field in
itializer, with no | 1482 * A flag indicating whether the parser is currently in a constructor field in
itializer, with no |
| 1461 * intervening parens, braces, or brackets. | 1483 * intervening parens, braces, or brackets. |
| 1462 */ | 1484 */ |
| 1463 bool _inInitializer = false; | 1485 bool _inInitializer = false; |
| 1464 | 1486 |
| 1487 static String ASYNC = "async"; |
| 1488 |
| 1489 static String _AWAIT = "await"; |
| 1490 |
| 1465 static String _HIDE = "hide"; | 1491 static String _HIDE = "hide"; |
| 1466 | 1492 |
| 1467 static String _OF = "of"; | 1493 static String _OF = "of"; |
| 1468 | 1494 |
| 1469 static String _ON = "on"; | 1495 static String _ON = "on"; |
| 1470 | 1496 |
| 1471 static String _NATIVE = "native"; | 1497 static String _NATIVE = "native"; |
| 1472 | 1498 |
| 1473 static String _SHOW = "show"; | 1499 static String _SHOW = "show"; |
| 1474 | 1500 |
| 1501 static String SYNC = "sync"; |
| 1502 |
| 1503 static String _YIELD = "yield"; |
| 1504 |
| 1475 /** | 1505 /** |
| 1476 * Initialize a newly created parser. | 1506 * Initialize a newly created parser. |
| 1477 * | 1507 * |
| 1478 * @param source the source being parsed | 1508 * @param source the source being parsed |
| 1479 * @param errorListener the error listener that will be informed of any errors
that are found | 1509 * @param errorListener the error listener that will be informed of any errors
that are found |
| 1480 * during the parse | 1510 * during the parse |
| 1481 */ | 1511 */ |
| 1482 Parser(this._source, this._errorListener); | 1512 Parser(this._source, this._errorListener); |
| 1483 | 1513 |
| 1484 /** | 1514 /** |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1560 InstrumentationBuilder instrumentation = Instrumentation.builder2("dart.engi
ne.Parser.parseStatements"); | 1590 InstrumentationBuilder instrumentation = Instrumentation.builder2("dart.engi
ne.Parser.parseStatements"); |
| 1561 try { | 1591 try { |
| 1562 _currentToken = token; | 1592 _currentToken = token; |
| 1563 return _parseStatementList(); | 1593 return _parseStatementList(); |
| 1564 } finally { | 1594 } finally { |
| 1565 instrumentation.log(); | 1595 instrumentation.log(); |
| 1566 } | 1596 } |
| 1567 } | 1597 } |
| 1568 | 1598 |
| 1569 /** | 1599 /** |
| 1600 * Set whether the parser is to parse the async support. |
| 1601 * |
| 1602 * @param parseAsync `true` if the parser is to parse the async support |
| 1603 */ |
| 1604 void set parseAsync(bool parseAsync) { |
| 1605 this._parseAsync = parseAsync; |
| 1606 } |
| 1607 |
| 1608 /** |
| 1570 * Set whether parser is to parse deferred libraries. | 1609 * Set whether parser is to parse deferred libraries. |
| 1571 * | 1610 * |
| 1572 * @param parseDeferredLibraries `true` if parser is to parse deferred librari
es | 1611 * @param parseDeferredLibraries `true` if parser is to parse deferred librari
es |
| 1573 */ | 1612 */ |
| 1574 void set parseDeferredLibraries(bool parseDeferredLibraries) { | 1613 void set parseDeferredLibraries(bool parseDeferredLibraries) { |
| 1575 this._parseDeferredLibraries = parseDeferredLibraries; | 1614 this._parseDeferredLibraries = parseDeferredLibraries; |
| 1576 } | 1615 } |
| 1577 | 1616 |
| 1578 /** | 1617 /** |
| 1579 * Set whether parser is to parse function bodies. | 1618 * Set whether parser is to parse function bodies. |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 * | conditionalExpression cascadeSection* | 2097 * | conditionalExpression cascadeSection* |
| 2059 * | throwExpression | 2098 * | throwExpression |
| 2060 * </pre> | 2099 * </pre> |
| 2061 * | 2100 * |
| 2062 * @return the expression that was parsed | 2101 * @return the expression that was parsed |
| 2063 */ | 2102 */ |
| 2064 Expression parseExpression2() { | 2103 Expression parseExpression2() { |
| 2065 if (_matchesKeyword(Keyword.THROW)) { | 2104 if (_matchesKeyword(Keyword.THROW)) { |
| 2066 return _parseThrowExpression(); | 2105 return _parseThrowExpression(); |
| 2067 } else if (_matchesKeyword(Keyword.RETHROW)) { | 2106 } else if (_matchesKeyword(Keyword.RETHROW)) { |
| 2107 // TODO(brianwilkerson) Rethrow is a statement again. |
| 2068 return _parseRethrowExpression(); | 2108 return _parseRethrowExpression(); |
| 2109 } else if (_parseAsync && _matchesString(_AWAIT)) { |
| 2110 return _parseAwaitExpression(); |
| 2069 } | 2111 } |
| 2070 // | 2112 // |
| 2071 // assignableExpression is a subset of conditionalExpression, so we can pars
e a conditional | 2113 // assignableExpression is a subset of conditionalExpression, so we can pars
e a conditional |
| 2072 // expression and then determine whether it is followed by an assignmentOper
ator, checking for | 2114 // expression and then determine whether it is followed by an assignmentOper
ator, checking for |
| 2073 // conformance to the restricted grammar after making that determination. | 2115 // conformance to the restricted grammar after making that determination. |
| 2074 // | 2116 // |
| 2075 Expression expression = parseConditionalExpression(); | 2117 Expression expression = parseConditionalExpression(); |
| 2076 TokenType tokenType = _currentToken.type; | 2118 TokenType tokenType = _currentToken.type; |
| 2077 if (tokenType == TokenType.PERIOD_PERIOD) { | 2119 if (tokenType == TokenType.PERIOD_PERIOD) { |
| 2078 List<Expression> cascadeSections = new List<Expression>(); | 2120 List<Expression> cascadeSections = new List<Expression>(); |
| (...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3551 } else { | 3593 } else { |
| 3552 if (!optional) { | 3594 if (!optional) { |
| 3553 // Report the missing selector. | 3595 // Report the missing selector. |
| 3554 _reportErrorForCurrentToken(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR,
[]); | 3596 _reportErrorForCurrentToken(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR,
[]); |
| 3555 } | 3597 } |
| 3556 return prefix; | 3598 return prefix; |
| 3557 } | 3599 } |
| 3558 } | 3600 } |
| 3559 | 3601 |
| 3560 /** | 3602 /** |
| 3603 * Parse a await expression. |
| 3604 * |
| 3605 * <pre> |
| 3606 * awaitExpression ::= |
| 3607 * 'await' expression ';' |
| 3608 * </pre> |
| 3609 * |
| 3610 * @return the await expression that was parsed |
| 3611 */ |
| 3612 AwaitExpression _parseAwaitExpression() { |
| 3613 Token awaitToken = andAdvance; |
| 3614 Expression expression = parseExpression2(); |
| 3615 Token semicolon = _expect(TokenType.SEMICOLON); |
| 3616 return new AwaitExpression(awaitToken, expression, semicolon); |
| 3617 } |
| 3618 |
| 3619 /** |
| 3561 * Parse a bitwise and expression. | 3620 * Parse a bitwise and expression. |
| 3562 * | 3621 * |
| 3563 * <pre> | 3622 * <pre> |
| 3564 * bitwiseAndExpression ::= | 3623 * bitwiseAndExpression ::= |
| 3565 * shiftExpression ('&' shiftExpression)* | 3624 * shiftExpression ('&' shiftExpression)* |
| 3566 * | 'super' ('&' shiftExpression)+ | 3625 * | 'super' ('&' shiftExpression)+ |
| 3567 * </pre> | 3626 * </pre> |
| 3568 * | 3627 * |
| 3569 * @return the bitwise and expression that was parsed | 3628 * @return the bitwise and expression that was parsed |
| 3570 */ | 3629 */ |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4630 * localVariableDeclaration ';' | 4689 * localVariableDeclaration ';' |
| 4631 * | expression? ';' | 4690 * | expression? ';' |
| 4632 * </pre> | 4691 * </pre> |
| 4633 * | 4692 * |
| 4634 * @return the for statement that was parsed | 4693 * @return the for statement that was parsed |
| 4635 */ | 4694 */ |
| 4636 Statement _parseForStatement() { | 4695 Statement _parseForStatement() { |
| 4637 bool wasInLoop = _inLoop; | 4696 bool wasInLoop = _inLoop; |
| 4638 _inLoop = true; | 4697 _inLoop = true; |
| 4639 try { | 4698 try { |
| 4699 Token awaitKeyword = null; |
| 4700 if (_matchesString(_AWAIT)) { |
| 4701 awaitKeyword = andAdvance; |
| 4702 } |
| 4640 Token forKeyword = _expectKeyword(Keyword.FOR); | 4703 Token forKeyword = _expectKeyword(Keyword.FOR); |
| 4641 Token leftParenthesis = _expect(TokenType.OPEN_PAREN); | 4704 Token leftParenthesis = _expect(TokenType.OPEN_PAREN); |
| 4642 VariableDeclarationList variableList = null; | 4705 VariableDeclarationList variableList = null; |
| 4643 Expression initialization = null; | 4706 Expression initialization = null; |
| 4644 if (!_matches(TokenType.SEMICOLON)) { | 4707 if (!_matches(TokenType.SEMICOLON)) { |
| 4645 CommentAndMetadata commentAndMetadata = _parseCommentAndMetadata(); | 4708 CommentAndMetadata commentAndMetadata = _parseCommentAndMetadata(); |
| 4646 if (_matchesIdentifier() && _tokenMatchesKeyword(_peek(), Keyword.IN)) { | 4709 if (_matchesIdentifier() && _tokenMatchesKeyword(_peek(), Keyword.IN)) { |
| 4647 List<VariableDeclaration> variables = new List<VariableDeclaration>(); | 4710 List<VariableDeclaration> variables = new List<VariableDeclaration>(); |
| 4648 SimpleIdentifier variableName = parseSimpleIdentifier(); | 4711 SimpleIdentifier variableName = parseSimpleIdentifier(); |
| 4649 variables.add(new VariableDeclaration(null, null, variableName, null,
null)); | 4712 variables.add(new VariableDeclaration(null, null, variableName, null,
null)); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 4676 if (!commentAndMetadata.metadata.isEmpty) { | 4739 if (!commentAndMetadata.metadata.isEmpty) { |
| 4677 } | 4740 } |
| 4678 identifier = variable.name; | 4741 identifier = variable.name; |
| 4679 } | 4742 } |
| 4680 } | 4743 } |
| 4681 Token inKeyword = _expectKeyword(Keyword.IN); | 4744 Token inKeyword = _expectKeyword(Keyword.IN); |
| 4682 Expression iterator = parseExpression2(); | 4745 Expression iterator = parseExpression2(); |
| 4683 Token rightParenthesis = _expect(TokenType.CLOSE_PAREN); | 4746 Token rightParenthesis = _expect(TokenType.CLOSE_PAREN); |
| 4684 Statement body = parseStatement2(); | 4747 Statement body = parseStatement2(); |
| 4685 if (loopVariable == null) { | 4748 if (loopVariable == null) { |
| 4686 return new ForEachStatement.con2(forKeyword, leftParenthesis, identi
fier, inKeyword, iterator, rightParenthesis, body); | 4749 return new ForEachStatement.con2(awaitKeyword, forKeyword, leftParen
thesis, identifier, inKeyword, iterator, rightParenthesis, body); |
| 4687 } | 4750 } |
| 4688 return new ForEachStatement.con1(forKeyword, leftParenthesis, loopVari
able, inKeyword, iterator, rightParenthesis, body); | 4751 return new ForEachStatement.con1(awaitKeyword, forKeyword, leftParenth
esis, loopVariable, inKeyword, iterator, rightParenthesis, body); |
| 4689 } | 4752 } |
| 4690 } | 4753 } |
| 4754 if (awaitKeyword != null) { |
| 4755 _reportErrorForToken(ParserErrorCode.INVALID_AWAIT_IN_FOR, awaitKeyword,
[]); |
| 4756 } |
| 4691 Token leftSeparator = _expect(TokenType.SEMICOLON); | 4757 Token leftSeparator = _expect(TokenType.SEMICOLON); |
| 4692 Expression condition = null; | 4758 Expression condition = null; |
| 4693 if (!_matches(TokenType.SEMICOLON)) { | 4759 if (!_matches(TokenType.SEMICOLON)) { |
| 4694 condition = parseExpression2(); | 4760 condition = parseExpression2(); |
| 4695 } | 4761 } |
| 4696 Token rightSeparator = _expect(TokenType.SEMICOLON); | 4762 Token rightSeparator = _expect(TokenType.SEMICOLON); |
| 4697 List<Expression> updaters = null; | 4763 List<Expression> updaters = null; |
| 4698 if (!_matches(TokenType.CLOSE_PAREN)) { | 4764 if (!_matches(TokenType.CLOSE_PAREN)) { |
| 4699 updaters = _parseExpressionList(); | 4765 updaters = _parseExpressionList(); |
| 4700 } | 4766 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 4729 bool wasInLoop = _inLoop; | 4795 bool wasInLoop = _inLoop; |
| 4730 bool wasInSwitch = _inSwitch; | 4796 bool wasInSwitch = _inSwitch; |
| 4731 _inLoop = false; | 4797 _inLoop = false; |
| 4732 _inSwitch = false; | 4798 _inSwitch = false; |
| 4733 try { | 4799 try { |
| 4734 if (_matches(TokenType.SEMICOLON)) { | 4800 if (_matches(TokenType.SEMICOLON)) { |
| 4735 if (!mayBeEmpty) { | 4801 if (!mayBeEmpty) { |
| 4736 _reportErrorForCurrentToken(emptyErrorCode, []); | 4802 _reportErrorForCurrentToken(emptyErrorCode, []); |
| 4737 } | 4803 } |
| 4738 return new EmptyFunctionBody(andAdvance); | 4804 return new EmptyFunctionBody(andAdvance); |
| 4739 } else if (_matches(TokenType.FUNCTION)) { | 4805 } else if (_matchesString(_NATIVE)) { |
| 4806 Token nativeToken = andAdvance; |
| 4807 StringLiteral stringLiteral = null; |
| 4808 if (_matches(TokenType.STRING)) { |
| 4809 stringLiteral = parseStringLiteral(); |
| 4810 } |
| 4811 return new NativeFunctionBody(nativeToken, stringLiteral, _expect(TokenT
ype.SEMICOLON)); |
| 4812 } |
| 4813 Token keyword = null; |
| 4814 Token star = null; |
| 4815 if (_parseAsync) { |
| 4816 if (_matchesString(ASYNC)) { |
| 4817 keyword = andAdvance; |
| 4818 if (_matches(TokenType.STAR)) { |
| 4819 star = andAdvance; |
| 4820 } |
| 4821 } else if (_matchesString(SYNC)) { |
| 4822 keyword = andAdvance; |
| 4823 if (_matches(TokenType.STAR)) { |
| 4824 star = andAdvance; |
| 4825 } |
| 4826 } |
| 4827 } |
| 4828 if (_matches(TokenType.FUNCTION)) { |
| 4829 if (keyword != null) { |
| 4830 if (!_tokenMatchesString(keyword, ASYNC)) { |
| 4831 _reportErrorForToken(ParserErrorCode.INVALID_SYNC, keyword, []); |
| 4832 keyword = null; |
| 4833 } else if (star != null) { |
| 4834 _reportErrorForToken(ParserErrorCode.INVALID_STAR_AFTER_ASYNC, star,
[]); |
| 4835 } |
| 4836 } |
| 4740 Token functionDefinition = andAdvance; | 4837 Token functionDefinition = andAdvance; |
| 4741 Expression expression = parseExpression2(); | 4838 Expression expression = parseExpression2(); |
| 4742 Token semicolon = null; | 4839 Token semicolon = null; |
| 4743 if (!inExpression) { | 4840 if (!inExpression) { |
| 4744 semicolon = _expect(TokenType.SEMICOLON); | 4841 semicolon = _expect(TokenType.SEMICOLON); |
| 4745 } | 4842 } |
| 4746 if (!_parseFunctionBodies) { | 4843 if (!_parseFunctionBodies) { |
| 4747 return new EmptyFunctionBody(_createSyntheticToken(TokenType.SEMICOLON
)); | 4844 return new EmptyFunctionBody(_createSyntheticToken(TokenType.SEMICOLON
)); |
| 4748 } | 4845 } |
| 4749 return new ExpressionFunctionBody(functionDefinition, expression, semico
lon); | 4846 return new ExpressionFunctionBody(keyword, functionDefinition, expressio
n, semicolon); |
| 4750 } else if (_matches(TokenType.OPEN_CURLY_BRACKET)) { | 4847 } else if (_matches(TokenType.OPEN_CURLY_BRACKET)) { |
| 4848 if (keyword != null) { |
| 4849 if (_tokenMatchesString(keyword, SYNC) && star == null) { |
| 4850 _reportErrorForToken(ParserErrorCode.MISSING_STAR_AFTER_SYNC, keywor
d, []); |
| 4851 } |
| 4852 } |
| 4751 if (!_parseFunctionBodies) { | 4853 if (!_parseFunctionBodies) { |
| 4752 _skipBlock(); | 4854 _skipBlock(); |
| 4753 return new EmptyFunctionBody(_createSyntheticToken(TokenType.SEMICOLON
)); | 4855 return new EmptyFunctionBody(_createSyntheticToken(TokenType.SEMICOLON
)); |
| 4754 } | 4856 } |
| 4755 return new BlockFunctionBody(parseBlock()); | 4857 return new BlockFunctionBody(keyword, star, parseBlock()); |
| 4756 } else if (_matchesString(_NATIVE)) { | |
| 4757 Token nativeToken = andAdvance; | |
| 4758 StringLiteral stringLiteral = null; | |
| 4759 if (_matches(TokenType.STRING)) { | |
| 4760 stringLiteral = parseStringLiteral(); | |
| 4761 } | |
| 4762 return new NativeFunctionBody(nativeToken, stringLiteral, _expect(TokenT
ype.SEMICOLON)); | |
| 4763 } else { | 4858 } else { |
| 4764 // Invalid function body | 4859 // Invalid function body |
| 4765 _reportErrorForCurrentToken(emptyErrorCode, []); | 4860 _reportErrorForCurrentToken(emptyErrorCode, []); |
| 4766 return new EmptyFunctionBody(_createSyntheticToken(TokenType.SEMICOLON))
; | 4861 return new EmptyFunctionBody(_createSyntheticToken(TokenType.SEMICOLON))
; |
| 4767 } | 4862 } |
| 4768 } finally { | 4863 } finally { |
| 4769 _inLoop = wasInLoop; | 4864 _inLoop = wasInLoop; |
| 4770 _inSwitch = wasInSwitch; | 4865 _inSwitch = wasInSwitch; |
| 4771 } | 4866 } |
| 4772 } | 4867 } |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5542 return _parseVariableDeclarationStatementAfterMetadata(commentAndMetadat
a); | 5637 return _parseVariableDeclarationStatementAfterMetadata(commentAndMetadat
a); |
| 5543 } else if (keyword == Keyword.NEW || keyword == Keyword.TRUE || keyword ==
Keyword.FALSE || keyword == Keyword.NULL || keyword == Keyword.SUPER || keyword
== Keyword.THIS) { | 5638 } else if (keyword == Keyword.NEW || keyword == Keyword.TRUE || keyword ==
Keyword.FALSE || keyword == Keyword.NULL || keyword == Keyword.SUPER || keyword
== Keyword.THIS) { |
| 5544 return new ExpressionStatement(parseExpression2(), _expect(TokenType.SEM
ICOLON)); | 5639 return new ExpressionStatement(parseExpression2(), _expect(TokenType.SEM
ICOLON)); |
| 5545 } else { | 5640 } else { |
| 5546 // | 5641 // |
| 5547 // We have found an error of some kind. Try to recover. | 5642 // We have found an error of some kind. Try to recover. |
| 5548 // | 5643 // |
| 5549 _reportErrorForCurrentToken(ParserErrorCode.MISSING_STATEMENT, []); | 5644 _reportErrorForCurrentToken(ParserErrorCode.MISSING_STATEMENT, []); |
| 5550 return new EmptyStatement(_createSyntheticToken(TokenType.SEMICOLON)); | 5645 return new EmptyStatement(_createSyntheticToken(TokenType.SEMICOLON)); |
| 5551 } | 5646 } |
| 5647 } else if (_parseAsync && _matchesString(_YIELD)) { |
| 5648 return _parseYieldStatement(); |
| 5649 } else if (_parseAsync && _matchesString(_AWAIT) && _tokenMatchesKeyword(_pe
ek(), Keyword.FOR)) { |
| 5650 return _parseForStatement(); |
| 5552 } else if (_matches(TokenType.SEMICOLON)) { | 5651 } else if (_matches(TokenType.SEMICOLON)) { |
| 5553 return _parseEmptyStatement(); | 5652 return _parseEmptyStatement(); |
| 5554 } else if (_isInitializedVariableDeclaration()) { | 5653 } else if (_isInitializedVariableDeclaration()) { |
| 5555 return _parseVariableDeclarationStatementAfterMetadata(commentAndMetadata)
; | 5654 return _parseVariableDeclarationStatementAfterMetadata(commentAndMetadata)
; |
| 5556 } else if (_isFunctionDeclaration()) { | 5655 } else if (_isFunctionDeclaration()) { |
| 5557 return _parseFunctionDeclarationStatement(); | 5656 return _parseFunctionDeclarationStatement(); |
| 5558 } else if (_matches(TokenType.CLOSE_CURLY_BRACKET)) { | 5657 } else if (_matches(TokenType.CLOSE_CURLY_BRACKET)) { |
| 5559 _reportErrorForCurrentToken(ParserErrorCode.MISSING_STATEMENT, []); | 5658 _reportErrorForCurrentToken(ParserErrorCode.MISSING_STATEMENT, []); |
| 5560 return new EmptyStatement(_createSyntheticToken(TokenType.SEMICOLON)); | 5659 return new EmptyStatement(_createSyntheticToken(TokenType.SEMICOLON)); |
| 5561 } else { | 5660 } else { |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6494 Expression condition = parseExpression2(); | 6593 Expression condition = parseExpression2(); |
| 6495 Token rightParenthesis = _expect(TokenType.CLOSE_PAREN); | 6594 Token rightParenthesis = _expect(TokenType.CLOSE_PAREN); |
| 6496 Statement body = parseStatement2(); | 6595 Statement body = parseStatement2(); |
| 6497 return new WhileStatement(keyword, leftParenthesis, condition, rightParent
hesis, body); | 6596 return new WhileStatement(keyword, leftParenthesis, condition, rightParent
hesis, body); |
| 6498 } finally { | 6597 } finally { |
| 6499 _inLoop = wasInLoop; | 6598 _inLoop = wasInLoop; |
| 6500 } | 6599 } |
| 6501 } | 6600 } |
| 6502 | 6601 |
| 6503 /** | 6602 /** |
| 6603 * Parse a yield statement. |
| 6604 * |
| 6605 * <pre> |
| 6606 * yieldStatement ::= |
| 6607 * 'yield' '*'? expression ';' |
| 6608 * </pre> |
| 6609 * |
| 6610 * @return the yield statement that was parsed |
| 6611 */ |
| 6612 YieldStatement _parseYieldStatement() { |
| 6613 Token yieldToken = andAdvance; |
| 6614 Token star = null; |
| 6615 if (_matches(TokenType.STAR)) { |
| 6616 star = andAdvance; |
| 6617 } |
| 6618 Expression expression = parseExpression2(); |
| 6619 Token semicolon = _expect(TokenType.SEMICOLON); |
| 6620 return new YieldStatement(yieldToken, star, expression, semicolon); |
| 6621 } |
| 6622 |
| 6623 /** |
| 6504 * Return the token that is immediately after the current token. This is equiv
alent to | 6624 * Return the token that is immediately after the current token. This is equiv
alent to |
| 6505 * [peekAt]. | 6625 * [peekAt]. |
| 6506 * | 6626 * |
| 6507 * @return the token that is immediately after the current token | 6627 * @return the token that is immediately after the current token |
| 6508 */ | 6628 */ |
| 6509 Token _peek() => _currentToken.next; | 6629 Token _peek() => _currentToken.next; |
| 6510 | 6630 |
| 6511 /** | 6631 /** |
| 6512 * Return the token that is the given distance after the current token. | 6632 * Return the token that is the given distance after the current token. |
| 6513 * | 6633 * |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6557 } | 6677 } |
| 6558 | 6678 |
| 6559 /** | 6679 /** |
| 6560 * Report an error with the given error code and arguments. | 6680 * Report an error with the given error code and arguments. |
| 6561 * | 6681 * |
| 6562 * @param errorCode the error code of the error to be reported | 6682 * @param errorCode the error code of the error to be reported |
| 6563 * @param token the token specifying the location of the error | 6683 * @param token the token specifying the location of the error |
| 6564 * @param arguments the arguments to the error, used to compose the error mess
age | 6684 * @param arguments the arguments to the error, used to compose the error mess
age |
| 6565 */ | 6685 */ |
| 6566 void _reportErrorForToken(ParserErrorCode errorCode, Token token, List<Object>
arguments) { | 6686 void _reportErrorForToken(ParserErrorCode errorCode, Token token, List<Object>
arguments) { |
| 6687 if (token.type == TokenType.EOF) { |
| 6688 token = token.previous; |
| 6689 } |
| 6567 _reportError(new AnalysisError.con2(_source, token.offset, Math.max(token.le
ngth, 1), errorCode, arguments)); | 6690 _reportError(new AnalysisError.con2(_source, token.offset, Math.max(token.le
ngth, 1), errorCode, arguments)); |
| 6568 } | 6691 } |
| 6569 | 6692 |
| 6570 /** | 6693 /** |
| 6571 * Skips a block with all containing blocks. | 6694 * Skips a block with all containing blocks. |
| 6572 */ | 6695 */ |
| 6573 void _skipBlock() { | 6696 void _skipBlock() { |
| 6574 Token endToken = (_currentToken as BeginToken).endToken; | 6697 Token endToken = (_currentToken as BeginToken).endToken; |
| 6575 if (endToken == null) { | 6698 if (endToken == null) { |
| 6576 endToken = _currentToken.next; | 6699 endToken = _currentToken.next; |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7029 /** | 7152 /** |
| 7030 * Return `true` if the given token matches the given keyword. | 7153 * Return `true` if the given token matches the given keyword. |
| 7031 * | 7154 * |
| 7032 * @param token the token being tested | 7155 * @param token the token being tested |
| 7033 * @param keyword the keyword that is being tested for | 7156 * @param keyword the keyword that is being tested for |
| 7034 * @return `true` if the given token matches the given keyword | 7157 * @return `true` if the given token matches the given keyword |
| 7035 */ | 7158 */ |
| 7036 bool _tokenMatchesKeyword(Token token, Keyword keyword) => token.type == Token
Type.KEYWORD && (token as KeywordToken).keyword == keyword; | 7159 bool _tokenMatchesKeyword(Token token, Keyword keyword) => token.type == Token
Type.KEYWORD && (token as KeywordToken).keyword == keyword; |
| 7037 | 7160 |
| 7038 /** | 7161 /** |
| 7162 * Return `true` if the given token matches the given identifier. |
| 7163 * |
| 7164 * @param token the token being tested |
| 7165 * @param identifier the identifier that can optionally appear in the current
location |
| 7166 * @return `true` if the current token matches the given identifier |
| 7167 */ |
| 7168 bool _tokenMatchesString(Token token, String identifier) => token.type == Toke
nType.IDENTIFIER && token.lexeme == identifier; |
| 7169 |
| 7170 /** |
| 7039 * Translate the characters at the given index in the given string, appending
the translated | 7171 * Translate the characters at the given index in the given string, appending
the translated |
| 7040 * character to the given builder. The index is assumed to be valid. | 7172 * character to the given builder. The index is assumed to be valid. |
| 7041 * | 7173 * |
| 7042 * @param builder the builder to which the translated character is to be appen
ded | 7174 * @param builder the builder to which the translated character is to be appen
ded |
| 7043 * @param lexeme the string containing the character(s) to be translated | 7175 * @param lexeme the string containing the character(s) to be translated |
| 7044 * @param index the index of the character to be translated | 7176 * @param index the index of the character to be translated |
| 7045 * @return the index of the next character to be translated | 7177 * @return the index of the next character to be translated |
| 7046 */ | 7178 */ |
| 7047 int _translateCharacter(JavaStringBuilder builder, String lexeme, int index) { | 7179 int _translateCharacter(JavaStringBuilder builder, String lexeme, int index) { |
| 7048 int currentChar = lexeme.codeUnitAt(index); | 7180 int currentChar = lexeme.codeUnitAt(index); |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7564 static const ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE = const Pars
erErrorCode.con3('ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE', 56, "Illegal assignment
to non-assignable expression"); | 7696 static const ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE = const Pars
erErrorCode.con3('ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE', 56, "Illegal assignment
to non-assignable expression"); |
| 7565 | 7697 |
| 7566 static const ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS = const ParserErrorCode
.con3('IMPLEMENTS_BEFORE_EXTENDS', 57, "The extends clause must be before the im
plements clause"); | 7698 static const ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS = const ParserErrorCode
.con3('IMPLEMENTS_BEFORE_EXTENDS', 57, "The extends clause must be before the im
plements clause"); |
| 7567 | 7699 |
| 7568 static const ParserErrorCode IMPLEMENTS_BEFORE_WITH = const ParserErrorCode.co
n3('IMPLEMENTS_BEFORE_WITH', 58, "The with clause must be before the implements
clause"); | 7700 static const ParserErrorCode IMPLEMENTS_BEFORE_WITH = const ParserErrorCode.co
n3('IMPLEMENTS_BEFORE_WITH', 58, "The with clause must be before the implements
clause"); |
| 7569 | 7701 |
| 7570 static const ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = const Par
serErrorCode.con3('IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 59, "Import directive
s must preceed part directives"); | 7702 static const ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = const Par
serErrorCode.con3('IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE', 59, "Import directive
s must preceed part directives"); |
| 7571 | 7703 |
| 7572 static const ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH = const ParserEr
rorCode.con3('INITIALIZED_VARIABLE_IN_FOR_EACH', 60, "The loop variable in a for
-each loop cannot be initialized"); | 7704 static const ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH = const ParserEr
rorCode.con3('INITIALIZED_VARIABLE_IN_FOR_EACH', 60, "The loop variable in a for
-each loop cannot be initialized"); |
| 7573 | 7705 |
| 7574 static const ParserErrorCode INVALID_CODE_POINT = const ParserErrorCode.con3('
INVALID_CODE_POINT', 61, "The escape sequence '%s' is not a valid code point"); | 7706 static const ParserErrorCode INVALID_AWAIT_IN_FOR = const ParserErrorCode.con4
('INVALID_AWAIT_IN_FOR', 61, "The modifier 'await' is not allowed for a normal '
for' statement", "Remove the keyword or use a for-each statement."); |
| 7575 | 7707 |
| 7576 static const ParserErrorCode INVALID_COMMENT_REFERENCE = const ParserErrorCode
.con3('INVALID_COMMENT_REFERENCE', 62, "Comment references should contain a poss
ibly prefixed identifier and can start with 'new', but should not contain anythi
ng else"); | 7708 static const ParserErrorCode INVALID_CODE_POINT = const ParserErrorCode.con3('
INVALID_CODE_POINT', 62, "The escape sequence '%s' is not a valid code point"); |
| 7577 | 7709 |
| 7578 static const ParserErrorCode INVALID_HEX_ESCAPE = const ParserErrorCode.con3('
INVALID_HEX_ESCAPE', 63, "An escape sequence starting with '\\x' must be followe
d by 2 hexidecimal digits"); | 7710 static const ParserErrorCode INVALID_COMMENT_REFERENCE = const ParserErrorCode
.con3('INVALID_COMMENT_REFERENCE', 63, "Comment references should contain a poss
ibly prefixed identifier and can start with 'new', but should not contain anythi
ng else"); |
| 7579 | 7711 |
| 7580 static const ParserErrorCode INVALID_OPERATOR = const ParserErrorCode.con3('IN
VALID_OPERATOR', 64, "The string '%s' is not a valid operator"); | 7712 static const ParserErrorCode INVALID_HEX_ESCAPE = const ParserErrorCode.con3('
INVALID_HEX_ESCAPE', 64, "An escape sequence starting with '\\x' must be followe
d by 2 hexidecimal digits"); |
| 7581 | 7713 |
| 7582 static const ParserErrorCode INVALID_OPERATOR_FOR_SUPER = const ParserErrorCod
e.con3('INVALID_OPERATOR_FOR_SUPER', 65, "The operator '%s' cannot be used with
'super'"); | 7714 static const ParserErrorCode INVALID_OPERATOR = const ParserErrorCode.con3('IN
VALID_OPERATOR', 65, "The string '%s' is not a valid operator"); |
| 7583 | 7715 |
| 7584 static const ParserErrorCode INVALID_UNICODE_ESCAPE = const ParserErrorCode.co
n3('INVALID_UNICODE_ESCAPE', 66, "An escape sequence starting with '\\u' must be
followed by 4 hexidecimal digits or from 1 to 6 digits between '{' and '}'"); | 7716 static const ParserErrorCode INVALID_OPERATOR_FOR_SUPER = const ParserErrorCod
e.con3('INVALID_OPERATOR_FOR_SUPER', 66, "The operator '%s' cannot be used with
'super'"); |
| 7585 | 7717 |
| 7586 static const ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST = const ParserErrorCo
de.con3('LIBRARY_DIRECTIVE_NOT_FIRST', 67, "The library directive must appear be
fore all other directives"); | 7718 static const ParserErrorCode INVALID_STAR_AFTER_ASYNC = const ParserErrorCode.
con4('INVALID_STAR_AFTER_ASYNC', 67, "The modifier 'async*' is not allowed for a
n expression function body", "Convert the body to a block."); |
| 7587 | 7719 |
| 7588 static const ParserErrorCode LOCAL_FUNCTION_DECLARATION_MODIFIER = const Parse
rErrorCode.con3('LOCAL_FUNCTION_DECLARATION_MODIFIER', 68, "Local function decla
rations cannot specify any modifier"); | 7720 static const ParserErrorCode INVALID_SYNC = const ParserErrorCode.con4('INVALI
D_SYNC', 68, "The modifier 'sync' is not allowed for an exrpression function bod
y", "Convert the body to a block."); |
| 7589 | 7721 |
| 7590 static const ParserErrorCode MISSING_ASSIGNABLE_SELECTOR = const ParserErrorCo
de.con3('MISSING_ASSIGNABLE_SELECTOR', 69, "Missing selector such as \".<identif
ier>\" or \"[0]\""); | 7722 static const ParserErrorCode INVALID_UNICODE_ESCAPE = const ParserErrorCode.co
n3('INVALID_UNICODE_ESCAPE', 69, "An escape sequence starting with '\\u' must be
followed by 4 hexidecimal digits or from 1 to 6 digits between '{' and '}'"); |
| 7591 | 7723 |
| 7592 static const ParserErrorCode MISSING_CATCH_OR_FINALLY = const ParserErrorCode.
con3('MISSING_CATCH_OR_FINALLY', 70, "A try statement must have either a catch o
r finally clause"); | 7724 static const ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST = const ParserErrorCo
de.con3('LIBRARY_DIRECTIVE_NOT_FIRST', 70, "The library directive must appear be
fore all other directives"); |
| 7593 | 7725 |
| 7594 static const ParserErrorCode MISSING_CLASS_BODY = const ParserErrorCode.con3('
MISSING_CLASS_BODY', 71, "A class definition must have a body, even if it is emp
ty"); | 7726 static const ParserErrorCode LOCAL_FUNCTION_DECLARATION_MODIFIER = const Parse
rErrorCode.con3('LOCAL_FUNCTION_DECLARATION_MODIFIER', 71, "Local function decla
rations cannot specify any modifier"); |
| 7595 | 7727 |
| 7596 static const ParserErrorCode MISSING_CLOSING_PARENTHESIS = const ParserErrorCo
de.con3('MISSING_CLOSING_PARENTHESIS', 72, "The closing parenthesis is missing")
; | 7728 static const ParserErrorCode MISSING_ASSIGNABLE_SELECTOR = const ParserErrorCo
de.con3('MISSING_ASSIGNABLE_SELECTOR', 72, "Missing selector such as \".<identif
ier>\" or \"[0]\""); |
| 7597 | 7729 |
| 7598 static const ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE = const ParserErr
orCode.con3('MISSING_CONST_FINAL_VAR_OR_TYPE', 73, "Variables must be declared u
sing the keywords 'const', 'final', 'var' or a type name"); | 7730 static const ParserErrorCode MISSING_CATCH_OR_FINALLY = const ParserErrorCode.
con3('MISSING_CATCH_OR_FINALLY', 73, "A try statement must have either a catch o
r finally clause"); |
| 7599 | 7731 |
| 7600 static const ParserErrorCode MISSING_EXPRESSION_IN_THROW = const ParserErrorCo
de.con3('MISSING_EXPRESSION_IN_THROW', 74, "Throw expressions must compute the o
bject to be thrown"); | 7732 static const ParserErrorCode MISSING_CLASS_BODY = const ParserErrorCode.con3('
MISSING_CLASS_BODY', 74, "A class definition must have a body, even if it is emp
ty"); |
| 7601 | 7733 |
| 7602 static const ParserErrorCode MISSING_FUNCTION_BODY = const ParserErrorCode.con
3('MISSING_FUNCTION_BODY', 75, "A function body must be provided"); | 7734 static const ParserErrorCode MISSING_CLOSING_PARENTHESIS = const ParserErrorCo
de.con3('MISSING_CLOSING_PARENTHESIS', 75, "The closing parenthesis is missing")
; |
| 7603 | 7735 |
| 7604 static const ParserErrorCode MISSING_FUNCTION_PARAMETERS = const ParserErrorCo
de.con3('MISSING_FUNCTION_PARAMETERS', 76, "Functions must have an explicit list
of parameters"); | 7736 static const ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE = const ParserErr
orCode.con3('MISSING_CONST_FINAL_VAR_OR_TYPE', 76, "Variables must be declared u
sing the keywords 'const', 'final', 'var' or a type name"); |
| 7605 | 7737 |
| 7606 static const ParserErrorCode MISSING_GET = const ParserErrorCode.con3('MISSING
_GET', 77, "Getters must have the keyword 'get' before the getter name"); | 7738 static const ParserErrorCode MISSING_EXPRESSION_IN_THROW = const ParserErrorCo
de.con3('MISSING_EXPRESSION_IN_THROW', 77, "Throw expressions must compute the o
bject to be thrown"); |
| 7607 | 7739 |
| 7608 static const ParserErrorCode MISSING_IDENTIFIER = const ParserErrorCode.con3('
MISSING_IDENTIFIER', 78, "Expected an identifier"); | 7740 static const ParserErrorCode MISSING_FUNCTION_BODY = const ParserErrorCode.con
3('MISSING_FUNCTION_BODY', 78, "A function body must be provided"); |
| 7609 | 7741 |
| 7610 static const ParserErrorCode MISSING_KEYWORD_OPERATOR = const ParserErrorCode.
con3('MISSING_KEYWORD_OPERATOR', 79, "Operator declarations must be preceeded by
the keyword 'operator'"); | 7742 static const ParserErrorCode MISSING_FUNCTION_PARAMETERS = const ParserErrorCo
de.con3('MISSING_FUNCTION_PARAMETERS', 79, "Functions must have an explicit list
of parameters"); |
| 7611 | 7743 |
| 7612 static const ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = const ParserE
rrorCode.con3('MISSING_NAME_IN_LIBRARY_DIRECTIVE', 80, "Library directives must
include a library name"); | 7744 static const ParserErrorCode MISSING_GET = const ParserErrorCode.con3('MISSING
_GET', 80, "Getters must have the keyword 'get' before the getter name"); |
| 7613 | 7745 |
| 7614 static const ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE = const ParserE
rrorCode.con3('MISSING_NAME_IN_PART_OF_DIRECTIVE', 81, "Library directives must
include a library name"); | 7746 static const ParserErrorCode MISSING_IDENTIFIER = const ParserErrorCode.con3('
MISSING_IDENTIFIER', 81, "Expected an identifier"); |
| 7615 | 7747 |
| 7616 static const ParserErrorCode MISSING_PREFIX_IN_DEFERRED_IMPORT = const ParserE
rrorCode.con3('MISSING_PREFIX_IN_DEFERRED_IMPORT', 82, "Deferred imports must ha
ve a prefix"); | 7748 static const ParserErrorCode MISSING_KEYWORD_OPERATOR = const ParserErrorCode.
con3('MISSING_KEYWORD_OPERATOR', 82, "Operator declarations must be preceeded by
the keyword 'operator'"); |
| 7617 | 7749 |
| 7618 static const ParserErrorCode MISSING_STATEMENT = const ParserErrorCode.con3('M
ISSING_STATEMENT', 83, "Expected a statement"); | 7750 static const ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = const ParserE
rrorCode.con3('MISSING_NAME_IN_LIBRARY_DIRECTIVE', 83, "Library directives must
include a library name"); |
| 7619 | 7751 |
| 7620 static const ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP = const Pa
rserErrorCode.con3('MISSING_TERMINATOR_FOR_PARAMETER_GROUP', 84, "There is no '%
s' to close the parameter group"); | 7752 static const ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE = const ParserE
rrorCode.con3('MISSING_NAME_IN_PART_OF_DIRECTIVE', 84, "Library directives must
include a library name"); |
| 7621 | 7753 |
| 7622 static const ParserErrorCode MISSING_TYPEDEF_PARAMETERS = const ParserErrorCod
e.con3('MISSING_TYPEDEF_PARAMETERS', 85, "Type aliases for functions must have a
n explicit list of parameters"); | 7754 static const ParserErrorCode MISSING_PREFIX_IN_DEFERRED_IMPORT = const ParserE
rrorCode.con3('MISSING_PREFIX_IN_DEFERRED_IMPORT', 85, "Deferred imports must ha
ve a prefix"); |
| 7623 | 7755 |
| 7624 static const ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = const ParserErrorC
ode.con3('MISSING_VARIABLE_IN_FOR_EACH', 86, "A loop variable must be declared i
n a for-each loop before the 'in', but none were found"); | 7756 static const ParserErrorCode MISSING_STAR_AFTER_SYNC = const ParserErrorCode.c
on4('MISSING_STAR_AFTER_SYNC', 86, "The modifier 'sync' must be followed by a st
ar ('*')", "Remove the modifier or add a star."); |
| 7625 | 7757 |
| 7626 static const ParserErrorCode MIXED_PARAMETER_GROUPS = const ParserErrorCode.co
n3('MIXED_PARAMETER_GROUPS', 87, "Cannot have both positional and named paramete
rs in a single parameter list"); | 7758 static const ParserErrorCode MISSING_STATEMENT = const ParserErrorCode.con3('M
ISSING_STATEMENT', 87, "Expected a statement"); |
| 7627 | 7759 |
| 7628 static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = const ParserErrorCode.
con3('MULTIPLE_EXTENDS_CLAUSES', 88, "Each class definition can have at most one
extends clause"); | 7760 static const ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP = const Pa
rserErrorCode.con3('MISSING_TERMINATOR_FOR_PARAMETER_GROUP', 88, "There is no '%
s' to close the parameter group"); |
| 7629 | 7761 |
| 7630 static const ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = const ParserErrorCo
de.con3('MULTIPLE_IMPLEMENTS_CLAUSES', 89, "Each class definition can have at mo
st one implements clause"); | 7762 static const ParserErrorCode MISSING_TYPEDEF_PARAMETERS = const ParserErrorCod
e.con3('MISSING_TYPEDEF_PARAMETERS', 89, "Type aliases for functions must have a
n explicit list of parameters"); |
| 7631 | 7763 |
| 7632 static const ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = const ParserErrorCo
de.con3('MULTIPLE_LIBRARY_DIRECTIVES', 90, "Only one library directive may be de
clared in a file"); | 7764 static const ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = const ParserErrorC
ode.con3('MISSING_VARIABLE_IN_FOR_EACH', 90, "A loop variable must be declared i
n a for-each loop before the 'in', but none were found"); |
| 7633 | 7765 |
| 7634 static const ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = const ParserErr
orCode.con3('MULTIPLE_NAMED_PARAMETER_GROUPS', 91, "Cannot have multiple groups
of named parameters in a single parameter list"); | 7766 static const ParserErrorCode MIXED_PARAMETER_GROUPS = const ParserErrorCode.co
n3('MIXED_PARAMETER_GROUPS', 91, "Cannot have both positional and named paramete
rs in a single parameter list"); |
| 7635 | 7767 |
| 7636 static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = const ParserErrorCo
de.con3('MULTIPLE_PART_OF_DIRECTIVES', 92, "Only one part-of directive may be de
clared in a file"); | 7768 static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES = const ParserErrorCode.
con3('MULTIPLE_EXTENDS_CLAUSES', 92, "Each class definition can have at most one
extends clause"); |
| 7637 | 7769 |
| 7638 static const ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = const Pars
erErrorCode.con3('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 93, "Cannot have multip
le groups of positional parameters in a single parameter list"); | 7770 static const ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = const ParserErrorCo
de.con3('MULTIPLE_IMPLEMENTS_CLAUSES', 93, "Each class definition can have at mo
st one implements clause"); |
| 7639 | 7771 |
| 7640 static const ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = const ParserErro
rCode.con3('MULTIPLE_VARIABLES_IN_FOR_EACH', 94, "A single loop variable must be
declared in a for-each loop before the 'in', but %s were found"); | 7772 static const ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES = const ParserErrorCo
de.con3('MULTIPLE_LIBRARY_DIRECTIVES', 94, "Only one library directive may be de
clared in a file"); |
| 7641 | 7773 |
| 7642 static const ParserErrorCode MULTIPLE_WITH_CLAUSES = const ParserErrorCode.con
3('MULTIPLE_WITH_CLAUSES', 95, "Each class definition can have at most one with
clause"); | 7774 static const ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = const ParserErr
orCode.con3('MULTIPLE_NAMED_PARAMETER_GROUPS', 95, "Cannot have multiple groups
of named parameters in a single parameter list"); |
| 7643 | 7775 |
| 7644 static const ParserErrorCode NAMED_FUNCTION_EXPRESSION = const ParserErrorCode
.con3('NAMED_FUNCTION_EXPRESSION', 96, "Function expressions cannot be named"); | 7776 static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES = const ParserErrorCo
de.con3('MULTIPLE_PART_OF_DIRECTIVES', 96, "Only one part-of directive may be de
clared in a file"); |
| 7645 | 7777 |
| 7646 static const ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = const ParserError
Code.con3('NAMED_PARAMETER_OUTSIDE_GROUP', 97, "Named parameters must be enclose
d in curly braces ('{' and '}')"); | 7778 static const ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS = const Pars
erErrorCode.con3('MULTIPLE_POSITIONAL_PARAMETER_GROUPS', 97, "Cannot have multip
le groups of positional parameters in a single parameter list"); |
| 7647 | 7779 |
| 7648 static const ParserErrorCode NATIVE_CLAUSE_IN_NON_SDK_CODE = const ParserError
Code.con3('NATIVE_CLAUSE_IN_NON_SDK_CODE', 98, "Native clause can only be used i
n the SDK and code that is loaded through native extensions"); | 7780 static const ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = const ParserErro
rCode.con3('MULTIPLE_VARIABLES_IN_FOR_EACH', 98, "A single loop variable must be
declared in a for-each loop before the 'in', but %s were found"); |
| 7649 | 7781 |
| 7650 static const ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE = const Pars
erErrorCode.con3('NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE', 99, "Native functions c
an only be declared in the SDK and code that is loaded through native extensions
"); | 7782 static const ParserErrorCode MULTIPLE_WITH_CLAUSES = const ParserErrorCode.con
3('MULTIPLE_WITH_CLAUSES', 99, "Each class definition can have at most one with
clause"); |
| 7651 | 7783 |
| 7652 static const ParserErrorCode NON_CONSTRUCTOR_FACTORY = const ParserErrorCode.c
on3('NON_CONSTRUCTOR_FACTORY', 100, "Only constructors can be declared to be a '
factory'"); | 7784 static const ParserErrorCode NAMED_FUNCTION_EXPRESSION = const ParserErrorCode
.con3('NAMED_FUNCTION_EXPRESSION', 100, "Function expressions cannot be named"); |
| 7653 | 7785 |
| 7654 static const ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = const ParserErrorCo
de.con3('NON_IDENTIFIER_LIBRARY_NAME', 101, "The name of a library must be an id
entifier"); | 7786 static const ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = const ParserError
Code.con3('NAMED_PARAMETER_OUTSIDE_GROUP', 101, "Named parameters must be enclos
ed in curly braces ('{' and '}')"); |
| 7655 | 7787 |
| 7656 static const ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = const ParserError
Code.con3('NON_PART_OF_DIRECTIVE_IN_PART', 102, "The part-of directive must be t
he only directive in a part"); | 7788 static const ParserErrorCode NATIVE_CLAUSE_IN_NON_SDK_CODE = const ParserError
Code.con3('NATIVE_CLAUSE_IN_NON_SDK_CODE', 102, "Native clause can only be used
in the SDK and code that is loaded through native extensions"); |
| 7657 | 7789 |
| 7658 static const ParserErrorCode NON_USER_DEFINABLE_OPERATOR = const ParserErrorCo
de.con3('NON_USER_DEFINABLE_OPERATOR', 103, "The operator '%s' is not user defin
able"); | 7790 static const ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE = const Pars
erErrorCode.con3('NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE', 103, "Native functions
can only be declared in the SDK and code that is loaded through native extension
s"); |
| 7659 | 7791 |
| 7660 static const ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = const ParserE
rrorCode.con3('NORMAL_BEFORE_OPTIONAL_PARAMETERS', 104, "Normal parameters must
occur before optional parameters"); | 7792 static const ParserErrorCode NON_CONSTRUCTOR_FACTORY = const ParserErrorCode.c
on3('NON_CONSTRUCTOR_FACTORY', 104, "Only constructors can be declared to be a '
factory'"); |
| 7661 | 7793 |
| 7662 static const ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = const ParserErr
orCode.con3('POSITIONAL_AFTER_NAMED_ARGUMENT', 105, "Positional arguments must o
ccur before named arguments"); | 7794 static const ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = const ParserErrorCo
de.con3('NON_IDENTIFIER_LIBRARY_NAME', 105, "The name of a library must be an id
entifier"); |
| 7663 | 7795 |
| 7664 static const ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = const Parser
ErrorCode.con3('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 106, "Positional parameters
must be enclosed in square brackets ('[' and ']')"); | 7796 static const ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = const ParserError
Code.con3('NON_PART_OF_DIRECTIVE_IN_PART', 106, "The part-of directive must be t
he only directive in a part"); |
| 7665 | 7797 |
| 7666 static const ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = const Pa
rserErrorCode.con3('REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR', 107, "Only factory
constructor can specify '=' redirection."); | 7798 static const ParserErrorCode NON_USER_DEFINABLE_OPERATOR = const ParserErrorCo
de.con3('NON_USER_DEFINABLE_OPERATOR', 107, "The operator '%s' is not user defin
able"); |
| 7667 | 7799 |
| 7668 static const ParserErrorCode SETTER_IN_FUNCTION = const ParserErrorCode.con3('
SETTER_IN_FUNCTION', 108, "Setters cannot be defined within methods or functions
"); | 7800 static const ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = const ParserE
rrorCode.con3('NORMAL_BEFORE_OPTIONAL_PARAMETERS', 108, "Normal parameters must
occur before optional parameters"); |
| 7669 | 7801 |
| 7670 static const ParserErrorCode STATIC_AFTER_CONST = const ParserErrorCode.con3('
STATIC_AFTER_CONST', 109, "The modifier 'static' should be before the modifier '
const'"); | 7802 static const ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = const ParserErr
orCode.con3('POSITIONAL_AFTER_NAMED_ARGUMENT', 109, "Positional arguments must o
ccur before named arguments"); |
| 7671 | 7803 |
| 7672 static const ParserErrorCode STATIC_AFTER_FINAL = const ParserErrorCode.con3('
STATIC_AFTER_FINAL', 110, "The modifier 'static' should be before the modifier '
final'"); | 7804 static const ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = const Parser
ErrorCode.con3('POSITIONAL_PARAMETER_OUTSIDE_GROUP', 110, "Positional parameters
must be enclosed in square brackets ('[' and ']')"); |
| 7673 | 7805 |
| 7674 static const ParserErrorCode STATIC_AFTER_VAR = const ParserErrorCode.con3('ST
ATIC_AFTER_VAR', 111, "The modifier 'static' should be before the modifier 'var'
"); | 7806 static const ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = const Pa
rserErrorCode.con3('REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR', 111, "Only factory
constructor can specify '=' redirection."); |
| 7675 | 7807 |
| 7676 static const ParserErrorCode STATIC_CONSTRUCTOR = const ParserErrorCode.con3('
STATIC_CONSTRUCTOR', 112, "Constructors cannot be static"); | 7808 static const ParserErrorCode SETTER_IN_FUNCTION = const ParserErrorCode.con3('
SETTER_IN_FUNCTION', 112, "Setters cannot be defined within methods or functions
"); |
| 7677 | 7809 |
| 7678 static const ParserErrorCode STATIC_GETTER_WITHOUT_BODY = const ParserErrorCod
e.con3('STATIC_GETTER_WITHOUT_BODY', 113, "A 'static' getter must have a body"); | 7810 static const ParserErrorCode STATIC_AFTER_CONST = const ParserErrorCode.con3('
STATIC_AFTER_CONST', 113, "The modifier 'static' should be before the modifier '
const'"); |
| 7679 | 7811 |
| 7680 static const ParserErrorCode STATIC_OPERATOR = const ParserErrorCode.con3('STA
TIC_OPERATOR', 114, "Operators cannot be static"); | 7812 static const ParserErrorCode STATIC_AFTER_FINAL = const ParserErrorCode.con3('
STATIC_AFTER_FINAL', 114, "The modifier 'static' should be before the modifier '
final'"); |
| 7681 | 7813 |
| 7682 static const ParserErrorCode STATIC_SETTER_WITHOUT_BODY = const ParserErrorCod
e.con3('STATIC_SETTER_WITHOUT_BODY', 115, "A 'static' setter must have a body"); | 7814 static const ParserErrorCode STATIC_AFTER_VAR = const ParserErrorCode.con3('ST
ATIC_AFTER_VAR', 115, "The modifier 'static' should be before the modifier 'var'
"); |
| 7683 | 7815 |
| 7684 static const ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = const ParserErrorC
ode.con3('STATIC_TOP_LEVEL_DECLARATION', 116, "Top-level declarations cannot be
declared to be 'static'"); | 7816 static const ParserErrorCode STATIC_CONSTRUCTOR = const ParserErrorCode.con3('
STATIC_CONSTRUCTOR', 116, "Constructors cannot be static"); |
| 7685 | 7817 |
| 7686 static const ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = const Parser
ErrorCode.con3('SWITCH_HAS_CASE_AFTER_DEFAULT_CASE', 117, "The 'default' case sh
ould be the last case in a switch statement"); | 7818 static const ParserErrorCode STATIC_GETTER_WITHOUT_BODY = const ParserErrorCod
e.con3('STATIC_GETTER_WITHOUT_BODY', 117, "A 'static' getter must have a body"); |
| 7687 | 7819 |
| 7688 static const ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES = const ParserE
rrorCode.con3('SWITCH_HAS_MULTIPLE_DEFAULT_CASES', 118, "The 'default' case can
only be declared once"); | 7820 static const ParserErrorCode STATIC_OPERATOR = const ParserErrorCode.con3('STA
TIC_OPERATOR', 118, "Operators cannot be static"); |
| 7689 | 7821 |
| 7690 static const ParserErrorCode TOP_LEVEL_OPERATOR = const ParserErrorCode.con3('
TOP_LEVEL_OPERATOR', 119, "Operators must be declared within a class"); | 7822 static const ParserErrorCode STATIC_SETTER_WITHOUT_BODY = const ParserErrorCod
e.con3('STATIC_SETTER_WITHOUT_BODY', 119, "A 'static' setter must have a body"); |
| 7691 | 7823 |
| 7692 static const ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = const
ParserErrorCode.con3('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 120, "There i
s no '%s' to open a parameter group"); | 7824 static const ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = const ParserErrorC
ode.con3('STATIC_TOP_LEVEL_DECLARATION', 120, "Top-level declarations cannot be
declared to be 'static'"); |
| 7693 | 7825 |
| 7694 static const ParserErrorCode UNEXPECTED_TOKEN = const ParserErrorCode.con3('UN
EXPECTED_TOKEN', 121, "Unexpected token '%s'"); | 7826 static const ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = const Parser
ErrorCode.con3('SWITCH_HAS_CASE_AFTER_DEFAULT_CASE', 121, "The 'default' case sh
ould be the last case in a switch statement"); |
| 7695 | 7827 |
| 7696 static const ParserErrorCode WITH_BEFORE_EXTENDS = const ParserErrorCode.con3(
'WITH_BEFORE_EXTENDS', 122, "The extends clause must be before the with clause")
; | 7828 static const ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES = const ParserE
rrorCode.con3('SWITCH_HAS_MULTIPLE_DEFAULT_CASES', 122, "The 'default' case can
only be declared once"); |
| 7697 | 7829 |
| 7698 static const ParserErrorCode WITH_WITHOUT_EXTENDS = const ParserErrorCode.con3
('WITH_WITHOUT_EXTENDS', 123, "The with clause cannot be used without an extends
clause"); | 7830 static const ParserErrorCode TOP_LEVEL_OPERATOR = const ParserErrorCode.con3('
TOP_LEVEL_OPERATOR', 123, "Operators must be declared within a class"); |
| 7699 | 7831 |
| 7700 static const ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = const Parse
rErrorCode.con3('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 124, "The default value o
f a named parameter should be preceeded by ':'"); | 7832 static const ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP = const
ParserErrorCode.con3('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP', 124, "There i
s no '%s' to open a parameter group"); |
| 7701 | 7833 |
| 7702 static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = const
ParserErrorCode.con3('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 125, "The defau
lt value of a positional parameter should be preceeded by '='"); | 7834 static const ParserErrorCode UNEXPECTED_TOKEN = const ParserErrorCode.con3('UN
EXPECTED_TOKEN', 125, "Unexpected token '%s'"); |
| 7703 | 7835 |
| 7704 static const ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = const Pars
erErrorCode.con3('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 126, "Expected '%s' to
close parameter group"); | 7836 static const ParserErrorCode WITH_BEFORE_EXTENDS = const ParserErrorCode.con3(
'WITH_BEFORE_EXTENDS', 126, "The extends clause must be before the with clause")
; |
| 7705 | 7837 |
| 7706 static const ParserErrorCode VAR_AND_TYPE = const ParserErrorCode.con3('VAR_AN
D_TYPE', 127, "Variables cannot be declared using both 'var' and a type name; re
move the 'var'"); | 7838 static const ParserErrorCode WITH_WITHOUT_EXTENDS = const ParserErrorCode.con3
('WITH_WITHOUT_EXTENDS', 127, "The with clause cannot be used without an extends
clause"); |
| 7707 | 7839 |
| 7708 static const ParserErrorCode VAR_AS_TYPE_NAME = const ParserErrorCode.con3('VA
R_AS_TYPE_NAME', 128, "The keyword 'var' cannot be used as a type name"); | 7840 static const ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER = const Parse
rErrorCode.con3('WRONG_SEPARATOR_FOR_NAMED_PARAMETER', 128, "The default value o
f a named parameter should be preceeded by ':'"); |
| 7709 | 7841 |
| 7710 static const ParserErrorCode VAR_CLASS = const ParserErrorCode.con3('VAR_CLASS
', 129, "Classes cannot be declared to be 'var'"); | 7842 static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = const
ParserErrorCode.con3('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 129, "The defau
lt value of a positional parameter should be preceeded by '='"); |
| 7711 | 7843 |
| 7712 static const ParserErrorCode VAR_RETURN_TYPE = const ParserErrorCode.con3('VAR
_RETURN_TYPE', 130, "The return type cannot be 'var'"); | 7844 static const ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = const Pars
erErrorCode.con3('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 130, "Expected '%s' to
close parameter group"); |
| 7713 | 7845 |
| 7714 static const ParserErrorCode VAR_TYPEDEF = const ParserErrorCode.con3('VAR_TYP
EDEF', 131, "Type aliases cannot be declared to be 'var'"); | 7846 static const ParserErrorCode VAR_AND_TYPE = const ParserErrorCode.con3('VAR_AN
D_TYPE', 131, "Variables cannot be declared using both 'var' and a type name; re
move the 'var'"); |
| 7715 | 7847 |
| 7716 static const ParserErrorCode VOID_PARAMETER = const ParserErrorCode.con3('VOID
_PARAMETER', 132, "Parameters cannot have a type of 'void'"); | 7848 static const ParserErrorCode VAR_AS_TYPE_NAME = const ParserErrorCode.con3('VA
R_AS_TYPE_NAME', 132, "The keyword 'var' cannot be used as a type name"); |
| 7717 | 7849 |
| 7718 static const ParserErrorCode VOID_VARIABLE = const ParserErrorCode.con3('VOID_
VARIABLE', 133, "Variables cannot have a type of 'void'"); | 7850 static const ParserErrorCode VAR_CLASS = const ParserErrorCode.con3('VAR_CLASS
', 133, "Classes cannot be declared to be 'var'"); |
| 7851 |
| 7852 static const ParserErrorCode VAR_RETURN_TYPE = const ParserErrorCode.con3('VAR
_RETURN_TYPE', 134, "The return type cannot be 'var'"); |
| 7853 |
| 7854 static const ParserErrorCode VAR_TYPEDEF = const ParserErrorCode.con3('VAR_TYP
EDEF', 135, "Type aliases cannot be declared to be 'var'"); |
| 7855 |
| 7856 static const ParserErrorCode VOID_PARAMETER = const ParserErrorCode.con3('VOID
_PARAMETER', 136, "Parameters cannot have a type of 'void'"); |
| 7857 |
| 7858 static const ParserErrorCode VOID_VARIABLE = const ParserErrorCode.con3('VOID_
VARIABLE', 137, "Variables cannot have a type of 'void'"); |
| 7719 | 7859 |
| 7720 static const List<ParserErrorCode> values = const [ | 7860 static const List<ParserErrorCode> values = const [ |
| 7721 ABSTRACT_CLASS_MEMBER, | 7861 ABSTRACT_CLASS_MEMBER, |
| 7722 ABSTRACT_STATIC_METHOD, | 7862 ABSTRACT_STATIC_METHOD, |
| 7723 ABSTRACT_TOP_LEVEL_FUNCTION, | 7863 ABSTRACT_TOP_LEVEL_FUNCTION, |
| 7724 ABSTRACT_TOP_LEVEL_VARIABLE, | 7864 ABSTRACT_TOP_LEVEL_VARIABLE, |
| 7725 ABSTRACT_TYPEDEF, | 7865 ABSTRACT_TYPEDEF, |
| 7726 ASSERT_DOES_NOT_TAKE_ASSIGNMENT, | 7866 ASSERT_DOES_NOT_TAKE_ASSIGNMENT, |
| 7727 ASSERT_DOES_NOT_TAKE_CASCADE, | 7867 ASSERT_DOES_NOT_TAKE_CASCADE, |
| 7728 ASSERT_DOES_NOT_TAKE_THROW, | 7868 ASSERT_DOES_NOT_TAKE_THROW, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7772 FINAL_METHOD, | 7912 FINAL_METHOD, |
| 7773 FINAL_TYPEDEF, | 7913 FINAL_TYPEDEF, |
| 7774 FUNCTION_TYPED_PARAMETER_VAR, | 7914 FUNCTION_TYPED_PARAMETER_VAR, |
| 7775 GETTER_IN_FUNCTION, | 7915 GETTER_IN_FUNCTION, |
| 7776 GETTER_WITH_PARAMETERS, | 7916 GETTER_WITH_PARAMETERS, |
| 7777 ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, | 7917 ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, |
| 7778 IMPLEMENTS_BEFORE_EXTENDS, | 7918 IMPLEMENTS_BEFORE_EXTENDS, |
| 7779 IMPLEMENTS_BEFORE_WITH, | 7919 IMPLEMENTS_BEFORE_WITH, |
| 7780 IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, | 7920 IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE, |
| 7781 INITIALIZED_VARIABLE_IN_FOR_EACH, | 7921 INITIALIZED_VARIABLE_IN_FOR_EACH, |
| 7922 INVALID_AWAIT_IN_FOR, |
| 7782 INVALID_CODE_POINT, | 7923 INVALID_CODE_POINT, |
| 7783 INVALID_COMMENT_REFERENCE, | 7924 INVALID_COMMENT_REFERENCE, |
| 7784 INVALID_HEX_ESCAPE, | 7925 INVALID_HEX_ESCAPE, |
| 7785 INVALID_OPERATOR, | 7926 INVALID_OPERATOR, |
| 7786 INVALID_OPERATOR_FOR_SUPER, | 7927 INVALID_OPERATOR_FOR_SUPER, |
| 7928 INVALID_STAR_AFTER_ASYNC, |
| 7929 INVALID_SYNC, |
| 7787 INVALID_UNICODE_ESCAPE, | 7930 INVALID_UNICODE_ESCAPE, |
| 7788 LIBRARY_DIRECTIVE_NOT_FIRST, | 7931 LIBRARY_DIRECTIVE_NOT_FIRST, |
| 7789 LOCAL_FUNCTION_DECLARATION_MODIFIER, | 7932 LOCAL_FUNCTION_DECLARATION_MODIFIER, |
| 7790 MISSING_ASSIGNABLE_SELECTOR, | 7933 MISSING_ASSIGNABLE_SELECTOR, |
| 7791 MISSING_CATCH_OR_FINALLY, | 7934 MISSING_CATCH_OR_FINALLY, |
| 7792 MISSING_CLASS_BODY, | 7935 MISSING_CLASS_BODY, |
| 7793 MISSING_CLOSING_PARENTHESIS, | 7936 MISSING_CLOSING_PARENTHESIS, |
| 7794 MISSING_CONST_FINAL_VAR_OR_TYPE, | 7937 MISSING_CONST_FINAL_VAR_OR_TYPE, |
| 7795 MISSING_EXPRESSION_IN_THROW, | 7938 MISSING_EXPRESSION_IN_THROW, |
| 7796 MISSING_FUNCTION_BODY, | 7939 MISSING_FUNCTION_BODY, |
| 7797 MISSING_FUNCTION_PARAMETERS, | 7940 MISSING_FUNCTION_PARAMETERS, |
| 7798 MISSING_GET, | 7941 MISSING_GET, |
| 7799 MISSING_IDENTIFIER, | 7942 MISSING_IDENTIFIER, |
| 7800 MISSING_KEYWORD_OPERATOR, | 7943 MISSING_KEYWORD_OPERATOR, |
| 7801 MISSING_NAME_IN_LIBRARY_DIRECTIVE, | 7944 MISSING_NAME_IN_LIBRARY_DIRECTIVE, |
| 7802 MISSING_NAME_IN_PART_OF_DIRECTIVE, | 7945 MISSING_NAME_IN_PART_OF_DIRECTIVE, |
| 7803 MISSING_PREFIX_IN_DEFERRED_IMPORT, | 7946 MISSING_PREFIX_IN_DEFERRED_IMPORT, |
| 7947 MISSING_STAR_AFTER_SYNC, |
| 7804 MISSING_STATEMENT, | 7948 MISSING_STATEMENT, |
| 7805 MISSING_TERMINATOR_FOR_PARAMETER_GROUP, | 7949 MISSING_TERMINATOR_FOR_PARAMETER_GROUP, |
| 7806 MISSING_TYPEDEF_PARAMETERS, | 7950 MISSING_TYPEDEF_PARAMETERS, |
| 7807 MISSING_VARIABLE_IN_FOR_EACH, | 7951 MISSING_VARIABLE_IN_FOR_EACH, |
| 7808 MIXED_PARAMETER_GROUPS, | 7952 MIXED_PARAMETER_GROUPS, |
| 7809 MULTIPLE_EXTENDS_CLAUSES, | 7953 MULTIPLE_EXTENDS_CLAUSES, |
| 7810 MULTIPLE_IMPLEMENTS_CLAUSES, | 7954 MULTIPLE_IMPLEMENTS_CLAUSES, |
| 7811 MULTIPLE_LIBRARY_DIRECTIVES, | 7955 MULTIPLE_LIBRARY_DIRECTIVES, |
| 7812 MULTIPLE_NAMED_PARAMETER_GROUPS, | 7956 MULTIPLE_NAMED_PARAMETER_GROUPS, |
| 7813 MULTIPLE_PART_OF_DIRECTIVES, | 7957 MULTIPLE_PART_OF_DIRECTIVES, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7886 */ | 8030 */ |
| 7887 const ParserErrorCode.con2(String name, int ordinal, this.errorSeverity, this.
message, this.correction) : super(name, ordinal); | 8031 const ParserErrorCode.con2(String name, int ordinal, this.errorSeverity, this.
message, this.correction) : super(name, ordinal); |
| 7888 | 8032 |
| 7889 /** | 8033 /** |
| 7890 * Initialize a newly created error code to have the given message and a sever
ity of ERROR. | 8034 * Initialize a newly created error code to have the given message and a sever
ity of ERROR. |
| 7891 * | 8035 * |
| 7892 * @param message the message template used to create the message to be displa
yed for the error | 8036 * @param message the message template used to create the message to be displa
yed for the error |
| 7893 */ | 8037 */ |
| 7894 const ParserErrorCode.con3(String name, int ordinal, String message) : this.co
n2(name, ordinal, ErrorSeverity.ERROR, message, null); | 8038 const ParserErrorCode.con3(String name, int ordinal, String message) : this.co
n2(name, ordinal, ErrorSeverity.ERROR, message, null); |
| 7895 | 8039 |
| 8040 /** |
| 8041 * Initialize a newly created error code to have the given message and a sever
ity of ERROR. |
| 8042 * |
| 8043 * @param message the message template used to create the message to be displa
yed for the error |
| 8044 * @param correction the template used to create the correction to be displaye
d for the error |
| 8045 */ |
| 8046 const ParserErrorCode.con4(String name, int ordinal, String message, String co
rrection) : this.con2(name, ordinal, ErrorSeverity.ERROR, message, correction); |
| 8047 |
| 7896 @override | 8048 @override |
| 7897 ErrorType get type => ErrorType.SYNTACTIC_ERROR; | 8049 ErrorType get type => ErrorType.SYNTACTIC_ERROR; |
| 7898 | 8050 |
| 7899 @override | 8051 @override |
| 7900 String get uniqueName => "${runtimeType.toString()}.${name}"; | 8052 String get uniqueName => "${runtimeType.toString()}.${name}"; |
| 7901 } | 8053 } |
| 7902 | 8054 |
| 7903 /** | 8055 /** |
| 7904 * Instances of the class `SyntheticKeywordToken` implement a synthetic keyword
token. | 8056 * Instances of the class `SyntheticKeywordToken` implement a synthetic keyword
token. |
| 7905 */ | 8057 */ |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7988 toNode.propagatedElement = node.propagatedElement; | 8140 toNode.propagatedElement = node.propagatedElement; |
| 7989 toNode.propagatedType = node.propagatedType; | 8141 toNode.propagatedType = node.propagatedType; |
| 7990 toNode.staticElement = node.staticElement; | 8142 toNode.staticElement = node.staticElement; |
| 7991 toNode.staticType = node.staticType; | 8143 toNode.staticType = node.staticType; |
| 7992 return true; | 8144 return true; |
| 7993 } | 8145 } |
| 7994 return false; | 8146 return false; |
| 7995 } | 8147 } |
| 7996 | 8148 |
| 7997 @override | 8149 @override |
| 8150 bool visitAwaitExpression(AwaitExpression node) { |
| 8151 AwaitExpression toNode = this._toNode as AwaitExpression; |
| 8152 return javaBooleanAnd(javaBooleanAnd(_isEqualTokens(node.awaitKeyword, toNod
e.awaitKeyword), _isEqualNodes(node.expression, toNode.expression)), _isEqualTok
ens(node.semicolon, toNode.semicolon)); |
| 8153 } |
| 8154 |
| 8155 @override |
| 7998 bool visitBinaryExpression(BinaryExpression node) { | 8156 bool visitBinaryExpression(BinaryExpression node) { |
| 7999 BinaryExpression toNode = this._toNode as BinaryExpression; | 8157 BinaryExpression toNode = this._toNode as BinaryExpression; |
| 8000 if (javaBooleanAnd(javaBooleanAnd(_isEqualNodes(node.leftOperand, toNode.lef
tOperand), _isEqualTokens(node.operator, toNode.operator)), _isEqualNodes(node.r
ightOperand, toNode.rightOperand))) { | 8158 if (javaBooleanAnd(javaBooleanAnd(_isEqualNodes(node.leftOperand, toNode.lef
tOperand), _isEqualTokens(node.operator, toNode.operator)), _isEqualNodes(node.r
ightOperand, toNode.rightOperand))) { |
| 8001 toNode.propagatedElement = node.propagatedElement; | 8159 toNode.propagatedElement = node.propagatedElement; |
| 8002 toNode.propagatedType = node.propagatedType; | 8160 toNode.propagatedType = node.propagatedType; |
| 8003 toNode.staticElement = node.staticElement; | 8161 toNode.staticElement = node.staticElement; |
| 8004 toNode.staticType = node.staticType; | 8162 toNode.staticType = node.staticType; |
| 8005 return true; | 8163 return true; |
| 8006 } | 8164 } |
| 8007 return false; | 8165 return false; |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8769 WhileStatement toNode = this._toNode as WhileStatement; | 8927 WhileStatement toNode = this._toNode as WhileStatement; |
| 8770 return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(_isEqualT
okens(node.keyword, toNode.keyword), _isEqualTokens(node.leftParenthesis, toNode
.leftParenthesis)), _isEqualNodes(node.condition, toNode.condition)), _isEqualTo
kens(node.rightParenthesis, toNode.rightParenthesis)), _isEqualNodes(node.body,
toNode.body)); | 8928 return javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(javaBooleanAnd(_isEqualT
okens(node.keyword, toNode.keyword), _isEqualTokens(node.leftParenthesis, toNode
.leftParenthesis)), _isEqualNodes(node.condition, toNode.condition)), _isEqualTo
kens(node.rightParenthesis, toNode.rightParenthesis)), _isEqualNodes(node.body,
toNode.body)); |
| 8771 } | 8929 } |
| 8772 | 8930 |
| 8773 @override | 8931 @override |
| 8774 bool visitWithClause(WithClause node) { | 8932 bool visitWithClause(WithClause node) { |
| 8775 WithClause toNode = this._toNode as WithClause; | 8933 WithClause toNode = this._toNode as WithClause; |
| 8776 return javaBooleanAnd(_isEqualTokens(node.withKeyword, toNode.withKeyword),
_isEqualNodeLists(node.mixinTypes, toNode.mixinTypes)); | 8934 return javaBooleanAnd(_isEqualTokens(node.withKeyword, toNode.withKeyword),
_isEqualNodeLists(node.mixinTypes, toNode.mixinTypes)); |
| 8777 } | 8935 } |
| 8778 | 8936 |
| 8937 @override |
| 8938 bool visitYieldStatement(YieldStatement node) { |
| 8939 YieldStatement toNode = this._toNode as YieldStatement; |
| 8940 return javaBooleanAnd(javaBooleanAnd(_isEqualTokens(node.yieldKeyword, toNod
e.yieldKeyword), _isEqualNodes(node.expression, toNode.expression)), _isEqualTok
ens(node.semicolon, toNode.semicolon)); |
| 8941 } |
| 8942 |
| 8779 /** | 8943 /** |
| 8780 * Return `true` if the given lists of AST nodes have the same size and corres
ponding | 8944 * Return `true` if the given lists of AST nodes have the same size and corres
ponding |
| 8781 * elements are equal. | 8945 * elements are equal. |
| 8782 * | 8946 * |
| 8783 * @param first the first node being compared | 8947 * @param first the first node being compared |
| 8784 * @param second the second node being compared | 8948 * @param second the second node being compared |
| 8785 * @return `true` if the given AST nodes have the same size and corresponding
elements are | 8949 * @return `true` if the given AST nodes have the same size and corresponding
elements are |
| 8786 * equal | 8950 * equal |
| 8787 */ | 8951 */ |
| 8788 bool _isEqualNodeLists(NodeList first, NodeList second) { | 8952 bool _isEqualNodeLists(NodeList first, NodeList second) { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8946 'matches_1': new MethodTrampoline(1, (Parser target, arg0) => target._matches(
arg0)), | 9110 'matches_1': new MethodTrampoline(1, (Parser target, arg0) => target._matches(
arg0)), |
| 8947 'matchesGt_0': new MethodTrampoline(0, (Parser target) => target._matchesGt())
, | 9111 'matchesGt_0': new MethodTrampoline(0, (Parser target) => target._matchesGt())
, |
| 8948 'matchesIdentifier_0': new MethodTrampoline(0, (Parser target) => target._matc
hesIdentifier()), | 9112 'matchesIdentifier_0': new MethodTrampoline(0, (Parser target) => target._matc
hesIdentifier()), |
| 8949 'matchesKeyword_1': new MethodTrampoline(1, (Parser target, arg0) => target._m
atchesKeyword(arg0)), | 9113 'matchesKeyword_1': new MethodTrampoline(1, (Parser target, arg0) => target._m
atchesKeyword(arg0)), |
| 8950 'matchesString_1': new MethodTrampoline(1, (Parser target, arg0) => target._ma
tchesString(arg0)), | 9114 'matchesString_1': new MethodTrampoline(1, (Parser target, arg0) => target._ma
tchesString(arg0)), |
| 8951 'optional_1': new MethodTrampoline(1, (Parser target, arg0) => target._optiona
l(arg0)), | 9115 'optional_1': new MethodTrampoline(1, (Parser target, arg0) => target._optiona
l(arg0)), |
| 8952 'parseAdditiveExpression_0': new MethodTrampoline(0, (Parser target) => target
._parseAdditiveExpression()), | 9116 'parseAdditiveExpression_0': new MethodTrampoline(0, (Parser target) => target
._parseAdditiveExpression()), |
| 8953 'parseAssertStatement_0': new MethodTrampoline(0, (Parser target) => target._p
arseAssertStatement()), | 9117 'parseAssertStatement_0': new MethodTrampoline(0, (Parser target) => target._p
arseAssertStatement()), |
| 8954 'parseAssignableExpression_1': new MethodTrampoline(1, (Parser target, arg0) =
> target._parseAssignableExpression(arg0)), | 9118 'parseAssignableExpression_1': new MethodTrampoline(1, (Parser target, arg0) =
> target._parseAssignableExpression(arg0)), |
| 8955 'parseAssignableSelector_2': new MethodTrampoline(2, (Parser target, arg0, arg
1) => target._parseAssignableSelector(arg0, arg1)), | 9119 'parseAssignableSelector_2': new MethodTrampoline(2, (Parser target, arg0, arg
1) => target._parseAssignableSelector(arg0, arg1)), |
| 9120 'parseAwaitExpression_0': new MethodTrampoline(0, (Parser target) => target._p
arseAwaitExpression()), |
| 8956 'parseBitwiseAndExpression_0': new MethodTrampoline(0, (Parser target) => targ
et._parseBitwiseAndExpression()), | 9121 'parseBitwiseAndExpression_0': new MethodTrampoline(0, (Parser target) => targ
et._parseBitwiseAndExpression()), |
| 8957 'parseBitwiseXorExpression_0': new MethodTrampoline(0, (Parser target) => targ
et._parseBitwiseXorExpression()), | 9122 'parseBitwiseXorExpression_0': new MethodTrampoline(0, (Parser target) => targ
et._parseBitwiseXorExpression()), |
| 8958 'parseBreakStatement_0': new MethodTrampoline(0, (Parser target) => target._pa
rseBreakStatement()), | 9123 'parseBreakStatement_0': new MethodTrampoline(0, (Parser target) => target._pa
rseBreakStatement()), |
| 8959 'parseCascadeSection_0': new MethodTrampoline(0, (Parser target) => target._pa
rseCascadeSection()), | 9124 'parseCascadeSection_0': new MethodTrampoline(0, (Parser target) => target._pa
rseCascadeSection()), |
| 8960 'parseClassDeclaration_2': new MethodTrampoline(2, (Parser target, arg0, arg1)
=> target._parseClassDeclaration(arg0, arg1)), | 9125 'parseClassDeclaration_2': new MethodTrampoline(2, (Parser target, arg0, arg1)
=> target._parseClassDeclaration(arg0, arg1)), |
| 8961 'parseClassMembers_2': new MethodTrampoline(2, (Parser target, arg0, arg1) =>
target._parseClassMembers(arg0, arg1)), | 9126 'parseClassMembers_2': new MethodTrampoline(2, (Parser target, arg0, arg1) =>
target._parseClassMembers(arg0, arg1)), |
| 8962 'parseClassTypeAlias_3': new MethodTrampoline(3, (Parser target, arg0, arg1, a
rg2) => target._parseClassTypeAlias(arg0, arg1, arg2)), | 9127 'parseClassTypeAlias_3': new MethodTrampoline(3, (Parser target, arg0, arg1, a
rg2) => target._parseClassTypeAlias(arg0, arg1, arg2)), |
| 8963 'parseCombinators_0': new MethodTrampoline(0, (Parser target) => target._parse
Combinators()), | 9128 'parseCombinators_0': new MethodTrampoline(0, (Parser target) => target._parse
Combinators()), |
| 8964 'parseCommentAndMetadata_0': new MethodTrampoline(0, (Parser target) => target
._parseCommentAndMetadata()), | 9129 'parseCommentAndMetadata_0': new MethodTrampoline(0, (Parser target) => target
._parseCommentAndMetadata()), |
| 8965 'parseCommentReference_2': new MethodTrampoline(2, (Parser target, arg0, arg1)
=> target._parseCommentReference(arg0, arg1)), | 9130 'parseCommentReference_2': new MethodTrampoline(2, (Parser target, arg0, arg1)
=> target._parseCommentReference(arg0, arg1)), |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9024 'parseThrowExpressionWithoutCascade_0': new MethodTrampoline(0, (Parser target
) => target._parseThrowExpressionWithoutCascade()), | 9189 'parseThrowExpressionWithoutCascade_0': new MethodTrampoline(0, (Parser target
) => target._parseThrowExpressionWithoutCascade()), |
| 9025 'parseTryStatement_0': new MethodTrampoline(0, (Parser target) => target._pars
eTryStatement()), | 9190 'parseTryStatement_0': new MethodTrampoline(0, (Parser target) => target._pars
eTryStatement()), |
| 9026 'parseTypeAlias_1': new MethodTrampoline(1, (Parser target, arg0) => target._p
arseTypeAlias(arg0)), | 9191 'parseTypeAlias_1': new MethodTrampoline(1, (Parser target, arg0) => target._p
arseTypeAlias(arg0)), |
| 9027 'parseUnaryExpression_0': new MethodTrampoline(0, (Parser target) => target._p
arseUnaryExpression()), | 9192 'parseUnaryExpression_0': new MethodTrampoline(0, (Parser target) => target._p
arseUnaryExpression()), |
| 9028 'parseVariableDeclaration_0': new MethodTrampoline(0, (Parser target) => targe
t._parseVariableDeclaration()), | 9193 'parseVariableDeclaration_0': new MethodTrampoline(0, (Parser target) => targe
t._parseVariableDeclaration()), |
| 9029 'parseVariableDeclarationListAfterMetadata_1': new MethodTrampoline(1, (Parser
target, arg0) => target._parseVariableDeclarationListAfterMetadata(arg0)), | 9194 'parseVariableDeclarationListAfterMetadata_1': new MethodTrampoline(1, (Parser
target, arg0) => target._parseVariableDeclarationListAfterMetadata(arg0)), |
| 9030 'parseVariableDeclarationListAfterType_3': new MethodTrampoline(3, (Parser tar
get, arg0, arg1, arg2) => target._parseVariableDeclarationListAfterType(arg0, ar
g1, arg2)), | 9195 'parseVariableDeclarationListAfterType_3': new MethodTrampoline(3, (Parser tar
get, arg0, arg1, arg2) => target._parseVariableDeclarationListAfterType(arg0, ar
g1, arg2)), |
| 9031 'parseVariableDeclarationStatementAfterMetadata_1': new MethodTrampoline(1, (P
arser target, arg0) => target._parseVariableDeclarationStatementAfterMetadata(ar
g0)), | 9196 'parseVariableDeclarationStatementAfterMetadata_1': new MethodTrampoline(1, (P
arser target, arg0) => target._parseVariableDeclarationStatementAfterMetadata(ar
g0)), |
| 9032 'parseVariableDeclarationStatementAfterType_3': new MethodTrampoline(3, (Parse
r target, arg0, arg1, arg2) => target._parseVariableDeclarationStatementAfterTyp
e(arg0, arg1, arg2)), | 9197 'parseVariableDeclarationStatementAfterType_3': new MethodTrampoline(3, (Parse
r target, arg0, arg1, arg2) => target._parseVariableDeclarationStatementAfterTyp
e(arg0, arg1, arg2)), |
| 9033 'parseWhileStatement_0': new MethodTrampoline(0, (Parser target) => target._pa
rseWhileStatement()), | 9198 'parseWhileStatement_0': new MethodTrampoline(0, (Parser target) => target._pa
rseWhileStatement()), |
| 9199 'parseYieldStatement_0': new MethodTrampoline(0, (Parser target) => target._pa
rseYieldStatement()), |
| 9034 'peek_0': new MethodTrampoline(0, (Parser target) => target._peek()), | 9200 'peek_0': new MethodTrampoline(0, (Parser target) => target._peek()), |
| 9035 'peekAt_1': new MethodTrampoline(1, (Parser target, arg0) => target._peekAt(ar
g0)), | 9201 'peekAt_1': new MethodTrampoline(1, (Parser target, arg0) => target._peekAt(ar
g0)), |
| 9036 'reportError_1': new MethodTrampoline(1, (Parser target, arg0) => target._repo
rtError(arg0)), | 9202 'reportError_1': new MethodTrampoline(1, (Parser target, arg0) => target._repo
rtError(arg0)), |
| 9037 'reportErrorForCurrentToken_2': new MethodTrampoline(2, (Parser target, arg0,
arg1) => target._reportErrorForCurrentToken(arg0, arg1)), | 9203 'reportErrorForCurrentToken_2': new MethodTrampoline(2, (Parser target, arg0,
arg1) => target._reportErrorForCurrentToken(arg0, arg1)), |
| 9038 'reportErrorForNode_3': new MethodTrampoline(3, (Parser target, arg0, arg1, ar
g2) => target._reportErrorForNode(arg0, arg1, arg2)), | 9204 'reportErrorForNode_3': new MethodTrampoline(3, (Parser target, arg0, arg1, ar
g2) => target._reportErrorForNode(arg0, arg1, arg2)), |
| 9039 'reportErrorForToken_3': new MethodTrampoline(3, (Parser target, arg0, arg1, a
rg2) => target._reportErrorForToken(arg0, arg1, arg2)), | 9205 'reportErrorForToken_3': new MethodTrampoline(3, (Parser target, arg0, arg1, a
rg2) => target._reportErrorForToken(arg0, arg1, arg2)), |
| 9040 'skipBlock_0': new MethodTrampoline(0, (Parser target) => target._skipBlock())
, | 9206 'skipBlock_0': new MethodTrampoline(0, (Parser target) => target._skipBlock())
, |
| 9041 'skipFinalConstVarOrType_1': new MethodTrampoline(1, (Parser target, arg0) =>
target._skipFinalConstVarOrType(arg0)), | 9207 'skipFinalConstVarOrType_1': new MethodTrampoline(1, (Parser target, arg0) =>
target._skipFinalConstVarOrType(arg0)), |
| 9042 'skipFormalParameterList_1': new MethodTrampoline(1, (Parser target, arg0) =>
target._skipFormalParameterList(arg0)), | 9208 'skipFormalParameterList_1': new MethodTrampoline(1, (Parser target, arg0) =>
target._skipFormalParameterList(arg0)), |
| 9043 'skipPastMatchingToken_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget._skipPastMatchingToken(arg0)), | 9209 'skipPastMatchingToken_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget._skipPastMatchingToken(arg0)), |
| 9044 'skipPrefixedIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => t
arget._skipPrefixedIdentifier(arg0)), | 9210 'skipPrefixedIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => t
arget._skipPrefixedIdentifier(arg0)), |
| 9045 'skipReturnType_1': new MethodTrampoline(1, (Parser target, arg0) => target._s
kipReturnType(arg0)), | 9211 'skipReturnType_1': new MethodTrampoline(1, (Parser target, arg0) => target._s
kipReturnType(arg0)), |
| 9046 'skipSimpleIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get._skipSimpleIdentifier(arg0)), | 9212 'skipSimpleIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get._skipSimpleIdentifier(arg0)), |
| 9047 'skipStringInterpolation_1': new MethodTrampoline(1, (Parser target, arg0) =>
target._skipStringInterpolation(arg0)), | 9213 'skipStringInterpolation_1': new MethodTrampoline(1, (Parser target, arg0) =>
target._skipStringInterpolation(arg0)), |
| 9048 'skipStringLiteral_1': new MethodTrampoline(1, (Parser target, arg0) => target
._skipStringLiteral(arg0)), | 9214 'skipStringLiteral_1': new MethodTrampoline(1, (Parser target, arg0) => target
._skipStringLiteral(arg0)), |
| 9049 'skipTypeArgumentList_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get._skipTypeArgumentList(arg0)), | 9215 'skipTypeArgumentList_1': new MethodTrampoline(1, (Parser target, arg0) => tar
get._skipTypeArgumentList(arg0)), |
| 9050 'skipTypeName_1': new MethodTrampoline(1, (Parser target, arg0) => target._ski
pTypeName(arg0)), | 9216 'skipTypeName_1': new MethodTrampoline(1, (Parser target, arg0) => target._ski
pTypeName(arg0)), |
| 9051 'skipTypeParameterList_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget._skipTypeParameterList(arg0)), | 9217 'skipTypeParameterList_1': new MethodTrampoline(1, (Parser target, arg0) => ta
rget._skipTypeParameterList(arg0)), |
| 9052 'tokenMatches_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => targe
t._tokenMatches(arg0, arg1)), | 9218 'tokenMatches_2': new MethodTrampoline(2, (Parser target, arg0, arg1) => targe
t._tokenMatches(arg0, arg1)), |
| 9053 'tokenMatchesIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => t
arget._tokenMatchesIdentifier(arg0)), | 9219 'tokenMatchesIdentifier_1': new MethodTrampoline(1, (Parser target, arg0) => t
arget._tokenMatchesIdentifier(arg0)), |
| 9054 'tokenMatchesKeyword_2': new MethodTrampoline(2, (Parser target, arg0, arg1) =
> target._tokenMatchesKeyword(arg0, arg1)), | 9220 'tokenMatchesKeyword_2': new MethodTrampoline(2, (Parser target, arg0, arg1) =
> target._tokenMatchesKeyword(arg0, arg1)), |
| 9221 'tokenMatchesString_2': new MethodTrampoline(2, (Parser target, arg0, arg1) =>
target._tokenMatchesString(arg0, arg1)), |
| 9055 'translateCharacter_3': new MethodTrampoline(3, (Parser target, arg0, arg1, ar
g2) => target._translateCharacter(arg0, arg1, arg2)), | 9222 'translateCharacter_3': new MethodTrampoline(3, (Parser target, arg0, arg1, ar
g2) => target._translateCharacter(arg0, arg1, arg2)), |
| 9056 'unlockErrorListener_0': new MethodTrampoline(0, (Parser target) => target._un
lockErrorListener()), | 9223 'unlockErrorListener_0': new MethodTrampoline(0, (Parser target) => target._un
lockErrorListener()), |
| 9057 'validateFormalParameterList_1': new MethodTrampoline(1, (Parser target, arg0)
=> target._validateFormalParameterList(arg0)), | 9224 'validateFormalParameterList_1': new MethodTrampoline(1, (Parser target, arg0)
=> target._validateFormalParameterList(arg0)), |
| 9058 'validateModifiersForClass_1': new MethodTrampoline(1, (Parser target, arg0) =
> target._validateModifiersForClass(arg0)), | 9225 'validateModifiersForClass_1': new MethodTrampoline(1, (Parser target, arg0) =
> target._validateModifiersForClass(arg0)), |
| 9059 'validateModifiersForConstructor_1': new MethodTrampoline(1, (Parser target, a
rg0) => target._validateModifiersForConstructor(arg0)), | 9226 'validateModifiersForConstructor_1': new MethodTrampoline(1, (Parser target, a
rg0) => target._validateModifiersForConstructor(arg0)), |
| 9060 'validateModifiersForField_1': new MethodTrampoline(1, (Parser target, arg0) =
> target._validateModifiersForField(arg0)), | 9227 'validateModifiersForField_1': new MethodTrampoline(1, (Parser target, arg0) =
> target._validateModifiersForField(arg0)), |
| 9061 'validateModifiersForFunctionDeclarationStatement_1': new MethodTrampoline(1,
(Parser target, arg0) => target._validateModifiersForFunctionDeclarationStatemen
t(arg0)), | 9228 'validateModifiersForFunctionDeclarationStatement_1': new MethodTrampoline(1,
(Parser target, arg0) => target._validateModifiersForFunctionDeclarationStatemen
t(arg0)), |
| 9062 'validateModifiersForGetterOrSetterOrMethod_1': new MethodTrampoline(1, (Parse
r target, arg0) => target._validateModifiersForGetterOrSetterOrMethod(arg0)), | 9229 'validateModifiersForGetterOrSetterOrMethod_1': new MethodTrampoline(1, (Parse
r target, arg0) => target._validateModifiersForGetterOrSetterOrMethod(arg0)), |
| 9063 'validateModifiersForOperator_1': new MethodTrampoline(1, (Parser target, arg0
) => target._validateModifiersForOperator(arg0)), | 9230 'validateModifiersForOperator_1': new MethodTrampoline(1, (Parser target, arg0
) => target._validateModifiersForOperator(arg0)), |
| 9064 'validateModifiersForTopLevelDeclaration_1': new MethodTrampoline(1, (Parser t
arget, arg0) => target._validateModifiersForTopLevelDeclaration(arg0)), | 9231 'validateModifiersForTopLevelDeclaration_1': new MethodTrampoline(1, (Parser t
arget, arg0) => target._validateModifiersForTopLevelDeclaration(arg0)), |
| (...skipping 29 matching lines...) Expand all Loading... |
| 9094 return trampoline(target, arguments[0], arguments[1]); | 9261 return trampoline(target, arguments[0], arguments[1]); |
| 9095 case 3: | 9262 case 3: |
| 9096 return trampoline(target, arguments[0], arguments[1], arguments[2]); | 9263 return trampoline(target, arguments[0], arguments[1], arguments[2]); |
| 9097 case 4: | 9264 case 4: |
| 9098 return trampoline(target, arguments[0], arguments[1], arguments[2], argu
ments[3]); | 9265 return trampoline(target, arguments[0], arguments[1], arguments[2], argu
ments[3]); |
| 9099 default: | 9266 default: |
| 9100 throw new IllegalArgumentException("Not implemented for > 4 arguments"); | 9267 throw new IllegalArgumentException("Not implemented for > 4 arguments"); |
| 9101 } | 9268 } |
| 9102 } | 9269 } |
| 9103 } | 9270 } |
| OLD | NEW |