| 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 e325da2e537b216f1974ea5428c4e587d60efe76..146f0ab1820117d8d6af08d80d78b9851f392388 100644
|
| --- a/pkg/analyzer/lib/src/generated/parser.dart
|
| +++ b/pkg/analyzer/lib/src/generated/parser.dart
|
| @@ -238,6 +238,7 @@ class Parser {
|
| /**
|
| * A flag indicating whether the parser is to parse generic method syntax.
|
| */
|
| + @deprecated
|
| bool parseGenericMethods = false;
|
|
|
| /**
|
| @@ -1400,7 +1401,7 @@ class Parser {
|
| // function type alias that was parsed.
|
| _parseFunctionTypeAlias(commentAndMetadata, getAndAdvance());
|
| return null;
|
| - } else if (parseGenericMethods) {
|
| + } else {
|
| Token token = _skipTypeParameterList(_peek());
|
| if (token != null && _tokenMatches(token, TokenType.OPEN_PAREN)) {
|
| return _parseMethodDeclarationAfterReturnType(commentAndMetadata,
|
| @@ -1489,7 +1490,7 @@ class Parser {
|
| methodName,
|
| typeParameters,
|
| parameters);
|
| - } else if (parseGenericMethods && _tokenMatches(next, TokenType.LT)) {
|
| + } else if (_tokenMatches(next, TokenType.LT)) {
|
| return _parseMethodDeclarationAfterReturnType(commentAndMetadata,
|
| modifiers.externalKeyword, modifiers.staticKeyword, type);
|
| } else if (_tokenMatches(next, TokenType.OPEN_CURLY_BRACKET)) {
|
| @@ -4118,7 +4119,7 @@ class Parser {
|
| type == TokenType.PERIOD ||
|
| type == TokenType.QUESTION_PERIOD ||
|
| type == TokenType.OPEN_PAREN ||
|
| - (parseGenericMethods && type == TokenType.LT) ||
|
| + type == TokenType.LT ||
|
| type == TokenType.INDEX) {
|
| do {
|
| if (_isLikelyArgumentList()) {
|
| @@ -5763,9 +5764,6 @@ class Parser {
|
| if (_matches(TokenType.OPEN_PAREN)) {
|
| return true;
|
| }
|
| - if (!parseGenericMethods) {
|
| - return false;
|
| - }
|
| Token token = skipTypeArgumentList(_currentToken);
|
| return token != null && _tokenMatches(token, TokenType.OPEN_PAREN);
|
| }
|
| @@ -5824,9 +5822,6 @@ class Parser {
|
| }
|
|
|
| bool _isPeekGenericTypeParametersAndOpenParen() {
|
| - if (!parseGenericMethods) {
|
| - return false;
|
| - }
|
| Token token = _skipTypeParameterList(_peek());
|
| return token != null && _tokenMatches(token, TokenType.OPEN_PAREN);
|
| }
|
| @@ -6618,8 +6613,7 @@ class Parser {
|
| * See [parseGenericMethodComments].
|
| */
|
| TypeParameterList _parseGenericMethodTypeParameters() {
|
| - if (parseGenericMethods && _matches(TokenType.LT) ||
|
| - _injectGenericCommentTypeList()) {
|
| + if (_matches(TokenType.LT) || _injectGenericCommentTypeList()) {
|
| return parseTypeParameterList();
|
| }
|
| return null;
|
|
|