| Index: pkg/analyzer/test/generated/parser_test.dart
|
| diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
|
| index e74309d6d31aebada6826a5e0b61f9e19f8f06ea..ee61b20bcdc623663decf6fc9ec1bacccfa0da4e 100644
|
| --- a/pkg/analyzer/test/generated/parser_test.dart
|
| +++ b/pkg/analyzer/test/generated/parser_test.dart
|
| @@ -1197,21 +1197,11 @@ class Foo {
|
| }
|
|
|
| void test_extraCommaInParameterList() {
|
| - parseTrailingCommas = true;
|
| - parse4("parseFormalParameterList", "(int a, , int b)",
|
| - [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
|
| - parseTrailingCommas = false;
|
| parse4("parseFormalParameterList", "(int a, , int b)",
|
| [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
|
| }
|
|
|
| void test_extraCommaTrailingNamedParameterGroup() {
|
| - parseTrailingCommas = true;
|
| - parse4("parseFormalParameterList", "({int b},)", [
|
| - ParserErrorCode.MISSING_IDENTIFIER,
|
| - ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS
|
| - ]);
|
| - parseTrailingCommas = false;
|
| parse4("parseFormalParameterList", "({int b},)", [
|
| ParserErrorCode.MISSING_IDENTIFIER,
|
| ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS
|
| @@ -1219,12 +1209,6 @@ class Foo {
|
| }
|
|
|
| void test_extraCommaTrailingPositionalParameterGroup() {
|
| - parseTrailingCommas = true;
|
| - parse4("parseFormalParameterList", "([int b],)", [
|
| - ParserErrorCode.MISSING_IDENTIFIER,
|
| - ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS
|
| - ]);
|
| - parseTrailingCommas = false;
|
| parse4("parseFormalParameterList", "([int b],)", [
|
| ParserErrorCode.MISSING_IDENTIFIER,
|
| ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS
|
| @@ -1232,12 +1216,8 @@ class Foo {
|
| }
|
|
|
| void test_extraTrailingCommaInParameterList() {
|
| - parseTrailingCommas = true;
|
| parse4("parseFormalParameterList", "(a,,)",
|
| [ParserErrorCode.MISSING_IDENTIFIER]);
|
| - parseTrailingCommas = false;
|
| - parse4("parseFormalParameterList", "(a,,)",
|
| - [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
|
| }
|
|
|
| void test_factoryTopLevelDeclaration_class() {
|
| @@ -1740,7 +1720,6 @@ class Foo {
|
| }
|
|
|
| void test_missingIdentifierForParameterGroup() {
|
| - parseTrailingCommas = true;
|
| parse4("parseFormalParameterList", "(,)",
|
| [ParserErrorCode.MISSING_IDENTIFIER]);
|
| }
|
| @@ -2807,12 +2786,6 @@ class ParserTestCase extends EngineTestCase {
|
| bool enableGenericMethodComments = false;
|
|
|
| /**
|
| - * A flag indicating whether parsing trailing commas in parameter and argument
|
| - * lists should be enabled for this test.
|
| - */
|
| - bool parseTrailingCommas = false;
|
| -
|
| - /**
|
| * Return a CommentAndMetadata object with the given values that can be used for testing.
|
| *
|
| * @param comment the comment to be wrapped in the object
|
| @@ -2866,7 +2839,6 @@ class ParserTestCase extends EngineTestCase {
|
| parser.parseGenericMethods = enableGenericMethods;
|
| parser.parseGenericMethodComments = enableGenericMethodComments;
|
| parser.parseFunctionBodies = parseFunctionBodies;
|
| - parser.parseTrailingCommas = parseTrailingCommas;
|
| Object result =
|
| invokeParserMethodImpl(parser, methodName, objects, tokenStream);
|
| //
|
| @@ -4793,7 +4765,6 @@ class SimpleParserTest extends ParserTestCase {
|
| }
|
|
|
| void test_parseArgumentList_trailing_comma() {
|
| - parseTrailingCommas = true;
|
| ArgumentList argumentList = parse4("parseArgumentList", "(x, y, z,)");
|
| NodeList<Expression> arguments = argumentList.arguments;
|
| expect(arguments, hasLength(3));
|
| @@ -5982,7 +5953,6 @@ class SimpleParserTest extends ParserTestCase {
|
| }
|
|
|
| void test_parseClassMember_method_trailing_commas() {
|
| - parseTrailingCommas = true;
|
| MethodDeclaration method =
|
| parse("parseClassMember", <Object>["C"], "void f(int x, int y,) {}");
|
| expect(method.documentationComment, isNull);
|
| @@ -7899,7 +7869,6 @@ void''');
|
| }
|
|
|
| void test_parseFormalParameterList_named_trailing_comma() {
|
| - parseTrailingCommas = true;
|
| FormalParameterList parameterList =
|
| parse4("parseFormalParameterList", "(A a, {B b,})");
|
| expect(parameterList.leftParenthesis, isNotNull);
|
| @@ -7950,7 +7919,6 @@ void''');
|
| }
|
|
|
| void test_parseFormalParameterList_normal_single_trailing_comma() {
|
| - parseTrailingCommas = true;
|
| FormalParameterList parameterList =
|
| parse4("parseFormalParameterList", "(A a,)");
|
| expect(parameterList.leftParenthesis, isNotNull);
|
| @@ -7981,7 +7949,6 @@ void''');
|
| }
|
|
|
| void test_parseFormalParameterList_positional_trailing_comma() {
|
| - parseTrailingCommas = true;
|
| FormalParameterList parameterList =
|
| parse4("parseFormalParameterList", "(A a, [B b,])");
|
| expect(parameterList.leftParenthesis, isNotNull);
|
|
|