| 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 f63bb70615a521d647311d2c4335ae9acddaa1a5..fcf9b0132a2d4265d7527c05f679a4c09e57fd81 100644
|
| --- a/pkg/analyzer/lib/src/generated/parser.dart
|
| +++ b/pkg/analyzer/lib/src/generated/parser.dart
|
| @@ -2189,12 +2189,6 @@ class Parser {
|
| bool parseGenericMethodComments = false;
|
|
|
| /**
|
| - * A flag indicating whether the parser is to parse trailing commas in
|
| - * parameter and argument lists (sdk#26647).
|
| - */
|
| - bool parseTrailingCommas = false;
|
| -
|
| - /**
|
| * Initialize a newly created parser to parse tokens in the given [_source]
|
| * and to report any errors that are found to the given [_errorListener].
|
| */
|
| @@ -2330,7 +2324,7 @@ class Parser {
|
| bool foundNamedArgument = argument is NamedExpression;
|
| bool generatedError = false;
|
| while (_optional(TokenType.COMMA)) {
|
| - if (parseTrailingCommas && _matches(TokenType.CLOSE_PAREN)) {
|
| + if (_matches(TokenType.CLOSE_PAREN)) {
|
| break;
|
| }
|
| argument = parseArgument();
|
| @@ -6146,7 +6140,7 @@ class Parser {
|
| type = _currentToken.type;
|
|
|
| // Advance past trailing commas as appropriate.
|
| - if (parseTrailingCommas && type == TokenType.COMMA) {
|
| + if (type == TokenType.COMMA) {
|
| // Only parse commas trailing normal (non-positional/named) params.
|
| if (rightSquareBracket == null && rightCurlyBracket == null) {
|
| Token next = _peek();
|
|
|