From 8aa48712be7067c0b68da41dc2c8e31acc732d99 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Tue, 4 Apr 2023 14:55:00 +0000 Subject: [PATCH] Patterns parsing: recover from patternVariableDeclaration non-statement. Previously, if a pattern variable declaration appeared outside of a function or method, the parser would get very confused. Now it recognizes the situation, issues a comprehensible error message, and replaces the pattern with a synthetic identifier token so that the analyzer AST is somewhat sensible. Fixes #51322. Bug: https://github.com/dart-lang/sdk/issues/51322 Change-Id: Ica5f060cb483a39c4e50942d639939b1fab40bea Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293087 Reviewed-by: Johnni Winther Commit-Queue: Paul Berry --- .../lib/src/messages/codes_generated.dart | 13 +++ .../lib/src/parser/parser_impl.dart | 54 +++++++++++++ .../lib/src/parser/token_stream_rewriter.dart | 5 ++ .../services/correction/error_fix_status.yaml | 2 + .../src/dart/error/syntactic_errors.g.dart | 12 +++ .../lib/src/error/error_code_values.g.dart | 1 + .../test/generated/patterns_parser_test.dart | 78 ++++++++++++++++++ pkg/front_end/messages.yaml | 12 +++ ...ember_declarations.dart.intertwined.expect | 40 +++++++++ .../member_errors.dart.intertwined.expect | 50 ++++++++++++ ...level_declarations.dart.intertwined.expect | 10 +++ .../top_level_errors.dart.intertwined.expect | 6 ++ ...ith_type_arguments.dart.intertwined.expect | 4 + .../issue_22314.dart.intertwined.expect | 6 ++ ...ssue_42229_prime_6.dart.intertwined.expect | 2 + .../issue_45251.dart.intertwined.expect | 18 +++++ .../issue_45251_const.dart.intertwined.expect | 18 +++++ .../issue_45251_list.dart.intertwined.expect | 18 +++++ ...e_45251_list_const.dart.intertwined.expect | 18 +++++ ...sue_45251_list_new.dart.intertwined.expect | 18 +++++ .../issue_45251_new.dart.intertwined.expect | 18 +++++ .../issue_45251_set.dart.intertwined.expect | 18 +++++ ...ue_45251_set_const.dart.intertwined.expect | 18 +++++ ...ssue_45251_set_new.dart.intertwined.expect | 18 +++++ .../issue_48380_1.dart.intertwined.expect | 4 + ...ssue_48380_1_comma.dart.intertwined.expect | 4 + ...e_48380_1_comma_ok.dart.intertwined.expect | 4 + .../issue_48380_1_ok.dart.intertwined.expect | 4 + .../issue_48380_2.dart.intertwined.expect | 4 + ...ssue_48380_2_comma.dart.intertwined.expect | 4 + ...e_48380_2_comma_ok.dart.intertwined.expect | 4 + .../issue_48380_2_ok.dart.intertwined.expect | 4 + .../issue_48380_3.dart.intertwined.expect | 4 + ...ssue_48380_3_comma.dart.intertwined.expect | 4 + ...e_48380_3_comma_ok.dart.intertwined.expect | 4 + .../issue_48380_3_ok.dart.intertwined.expect | 4 + .../issue_48411.dart.intertwined.expect | 2 + .../issue_48411_prime.dart.intertwined.expect | 2 + ...ce_following_token.dart.intertwined.expect | 72 +++++++++++++++++ ...on_reference_kinds.dart.intertwined.expect | 8 ++ .../new_as_identifier.dart.intertwined.expect | 40 +++++++++ ...abstract_placement.dart.intertwined.expect | 12 +++ ...external_placement.dart.intertwined.expect | 14 ++++ ...issue_39858_prime1.dart.intertwined.expect | 12 +++ .../issue_40805_01.dart.intertwined.expect | 2 + .../issue_40805_02.dart.intertwined.expect | 2 + .../issue_40805_03.dart.intertwined.expect | 2 + ...0267_conditional_4.dart.intertwined.expect | 2 + ...e_late_in_non_nnbd.dart.intertwined.expect | 4 + .../const_patterns.dart.intertwined.expect | 8 ++ ...st_patterns_binary.dart.intertwined.expect | 4 + .../patternVariableDeclaration_inClass.dart | 3 + ...ernVariableDeclaration_inClass.dart.expect | 38 +++++++++ ...eclaration_inClass.dart.intertwined.expect | 81 +++++++++++++++++++ ...ableDeclaration_inClass.dart.parser.expect | 11 +++ ...bleDeclaration_inClass.dart.scanner.expect | 9 +++ .../patternVariableDeclaration_topLevel.dart | 1 + ...rnVariableDeclaration_topLevel.dart.expect | 23 ++++++ ...claration_topLevel.dart.intertwined.expect | 54 +++++++++++++ ...bleDeclaration_topLevel.dart.parser.expect | 7 ++ ...leDeclaration_topLevel.dart.scanner.expect | 5 ++ ...ype_with_modifiers.dart.intertwined.expect | 4 + 62 files changed, 927 insertions(+) create mode 100644 pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart create mode 100644 pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.expect create mode 100644 pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.intertwined.expect create mode 100644 pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.parser.expect create mode 100644 pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.scanner.expect create mode 100644 pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart create mode 100644 pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.expect create mode 100644 pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.intertwined.expect create mode 100644 pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.parser.expect create mode 100644 pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.scanner.expect diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart index cb6359b04a8..6f9b8b30699 100644 --- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart +++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart @@ -10982,6 +10982,19 @@ const MessageCode messagePatternMatchingError = const MessageCode( "PatternMatchingError", problemMessage: r"""Pattern matching error"""); +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codePatternVariableDeclarationOutsideFunctionOrMethod = + messagePatternVariableDeclarationOutsideFunctionOrMethod; + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const MessageCode messagePatternVariableDeclarationOutsideFunctionOrMethod = + const MessageCode("PatternVariableDeclarationOutsideFunctionOrMethod", + index: 152, + problemMessage: + r"""A pattern variable declaration may not appear outside a function or method.""", + correctionMessage: + r"""Try declaring ordinary variables and assigning from within a function or method."""); + // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codePlatformPrivateLibraryAccess = messagePlatformPrivateLibraryAccess; diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart index 6af5eb2895d..ea7546b949d 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart @@ -3348,6 +3348,32 @@ class Parser { } Token beforeType = token; + if (varFinalOrConst != null) { + Token? afterOuterPattern = skipOuterPattern(beforeType); + if (afterOuterPattern != null && + (optional('=', afterOuterPattern.next!))) { + reportRecoverableErrorWithEnd(beforeType.next!, afterOuterPattern, + codes.messagePatternVariableDeclarationOutsideFunctionOrMethod); + Token syntheticName = rewriter.insertSyntheticIdentifier(beforeType); + + rewriter.dropRange(syntheticName, afterOuterPattern.next!); + return parseFields( + beforeStart, + /* abstractToken = */ null, + augmentToken, + externalToken, + /* staticToken = */ null, + /* covariantToken = */ null, + lateToken, + varFinalOrConst, + beforeType, + noType, + syntheticName, + DeclarationKind.TopLevel, + /* enclosingDeclarationName = */ null, + /* nameIsRecovered = */ true); + } + } TypeInfo typeInfo = computeType(token, /* required = */ false, /* inDeclaration = */ true); token = typeInfo.skipType(token); @@ -4374,6 +4400,34 @@ class Parser { listener.beginMember(); Token beforeType = token; + if (varFinalOrConst != null) { + Token? afterOuterPattern = skipOuterPattern(beforeType); + if (afterOuterPattern != null && + (optional('=', afterOuterPattern.next!))) { + reportRecoverableErrorWithEnd(beforeType.next!, afterOuterPattern, + codes.messagePatternVariableDeclarationOutsideFunctionOrMethod); + Token syntheticName = rewriter.insertSyntheticIdentifier(beforeType); + + rewriter.dropRange(syntheticName, afterOuterPattern.next!); + token = parseFields( + beforeStart, + abstractToken, + augmentToken, + externalToken, + staticToken, + covariantToken, + lateToken, + varFinalOrConst, + beforeType, + noType, + syntheticName, + kind, + enclosingDeclarationName, + /* nameIsRecovered = */ true); + listener.endMember(); + return token; + } + } TypeInfo typeInfo = computeType( token, /* required = */ false, diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/token_stream_rewriter.dart b/pkg/_fe_analyzer_shared/lib/src/parser/token_stream_rewriter.dart index 4a2090391e7..4dd59c1d8f7 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/token_stream_rewriter.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/token_stream_rewriter.dart @@ -18,6 +18,11 @@ import '../scanner/token.dart' TokenType; abstract class TokenStreamRewriter { + /// Drops any tokens after [before] and before [after]. + void dropRange(Token before, Token after) { + _setNext(before, after); + } + /// Insert a synthetic open and close parenthesis and return the new synthetic /// open parenthesis. If [insertIdentifier] is true, then a synthetic /// identifier is included between the open and close parenthesis. diff --git a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml index 061502d8430..cdf4e044d3e 100644 --- a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml +++ b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml @@ -2651,6 +2651,8 @@ ParserErrorCode.OUT_OF_ORDER_CLAUSES: status: needsEvaluation ParserErrorCode.PATTERN_ASSIGNMENT_DECLARES_VARIABLE: status: needsEvaluation +ParserErrorCode.PATTERN_VARIABLE_DECLARATION_OUTSIDE_FUNCTION_OR_METHOD: + status: needsEvaluation ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT: status: needsEvaluation ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP: diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart index 9bcd01ffce9..44ee169ac53 100644 --- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart +++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart @@ -166,6 +166,7 @@ final fastaAnalyzerErrorCodes = [ ParserErrorCode.VARIABLE_PATTERN_KEYWORD_IN_DECLARATION_CONTEXT, ParserErrorCode.INVALID_INSIDE_UNARY_PATTERN, ParserErrorCode.LATE_PATTERN_VARIABLE_DECLARATION, + ParserErrorCode.PATTERN_VARIABLE_DECLARATION_OUTSIDE_FUNCTION_OR_METHOD, ]; class ParserErrorCode extends ErrorCode { @@ -1556,6 +1557,17 @@ class ParserErrorCode extends ErrorCode { "pattern variable declaration.", ); + /// No parameters. + static const ParserErrorCode + PATTERN_VARIABLE_DECLARATION_OUTSIDE_FUNCTION_OR_METHOD = ParserErrorCode( + 'PATTERN_VARIABLE_DECLARATION_OUTSIDE_FUNCTION_OR_METHOD', + "A pattern variable declaration may not appear outside a function or " + "method.", + correctionMessage: + "Try declaring ordinary variables and assigning from within a function " + "or method.", + ); + static const ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = ParserErrorCode( 'POSITIONAL_AFTER_NAMED_ARGUMENT', diff --git a/pkg/analyzer/lib/src/error/error_code_values.g.dart b/pkg/analyzer/lib/src/error/error_code_values.g.dart index 8713ead8363..19adae385e8 100644 --- a/pkg/analyzer/lib/src/error/error_code_values.g.dart +++ b/pkg/analyzer/lib/src/error/error_code_values.g.dart @@ -816,6 +816,7 @@ const List errorCodeValues = [ ParserErrorCode.NULL_AWARE_CASCADE_OUT_OF_ORDER, ParserErrorCode.OUT_OF_ORDER_CLAUSES, ParserErrorCode.PATTERN_ASSIGNMENT_DECLARES_VARIABLE, + ParserErrorCode.PATTERN_VARIABLE_DECLARATION_OUTSIDE_FUNCTION_OR_METHOD, ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT, ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP, ParserErrorCode.PREFIX_AFTER_COMBINATOR, diff --git a/pkg/analyzer/test/generated/patterns_parser_test.dart b/pkg/analyzer/test/generated/patterns_parser_test.dart index d8fb2eea381..5c98143263d 100644 --- a/pkg/analyzer/test/generated/patterns_parser_test.dart +++ b/pkg/analyzer/test/generated/patterns_parser_test.dart @@ -7538,6 +7538,84 @@ ForStatement '''); } + test_patternVariableDeclaration_inClass() { + // If a pattern variable declaration appears outside a function or method, + // the parser recovers by replacing the pattern with a synthetic identifier, + // so that it parses as an ordinary field or top level variable declaration. + _parse(''' +class C { + var (a, b) = (0, 1); +} +''', errors: [ + error( + ParserErrorCode + .PATTERN_VARIABLE_DECLARATION_OUTSIDE_FUNCTION_OR_METHOD, + 16, + 6), + ]); + var node = findNode.classDeclaration('class'); + assertParsedNodeText(node, r''' +ClassDeclaration + classKeyword: class + name: C + leftBracket: { + members + FieldDeclaration + fields: VariableDeclarationList + keyword: var + variables + VariableDeclaration + name: + equals: = + initializer: RecordLiteral + leftParenthesis: ( + fields + IntegerLiteral + literal: 0 + IntegerLiteral + literal: 1 + rightParenthesis: ) + semicolon: ; + rightBracket: } +'''); + } + + test_patternVariableDeclaration_topLevel() { + // If a pattern variable declaration appears outside a function or method, + // the parser recovers by replacing the pattern with a synthetic identifier, + // so that it parses as an ordinary field or top level variable declaration. + _parse(''' +var (a, b) = (0, 1); +''', errors: [ + error( + ParserErrorCode + .PATTERN_VARIABLE_DECLARATION_OUTSIDE_FUNCTION_OR_METHOD, + 4, + 6), + ]); + var node = findNode.unit; + assertParsedNodeText(node, r''' +CompilationUnit + declarations + TopLevelVariableDeclaration + variables: VariableDeclarationList + keyword: var + variables + VariableDeclaration + name: + equals: = + initializer: RecordLiteral + leftParenthesis: ( + fields + IntegerLiteral + literal: 0 + IntegerLiteral + literal: 1 + rightParenthesis: ) + semicolon: ; +'''); + } + test_patternVariableDeclarationStatement_disallowsConst() { // TODO(paulberry): do better error recovery. _parse(''' diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml index be7e7d8d826..12881ab254d 100644 --- a/pkg/front_end/messages.yaml +++ b/pkg/front_end/messages.yaml @@ -6743,6 +6743,18 @@ LatePatternVariableDeclaration: late var (y, z) = x; } +PatternVariableDeclarationOutsideFunctionOrMethod: + problemMessage: A pattern variable declaration may not appear outside a function or method. + correctionMessage: Try declaring ordinary variables and assigning from within a function or method. + analyzerCode: ParserErrorCode.PATTERN_VARIABLE_DECLARATION_OUTSIDE_FUNCTION_OR_METHOD + index: 152 + experiments: patterns + comment: No parameters. + script: | + class C { + var (a, b) = (0, 1); + } + WeakReferenceNotStatic: problemMessage: "Weak reference pragma can be used on a static method only." diff --git a/pkg/front_end/parser_testcases/augmentation/member_declarations.dart.intertwined.expect b/pkg/front_end/parser_testcases/augmentation/member_declarations.dart.intertwined.expect index bcfbcf4dda5..1c3ae45b145 100644 --- a/pkg/front_end/parser_testcases/augmentation/member_declarations.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/augmentation/member_declarations.dart.intertwined.expect @@ -248,6 +248,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(}, null, augment, null, null, null, null, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, null, var, }) listener: handleNoType(var) @@ -263,6 +265,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, null, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, null, final, ;) listener: handleNoType(final) @@ -285,6 +289,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, null, const, const, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, null, const, ;) listener: handleNoType(const) @@ -324,6 +330,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, late, var, ;) listener: handleNoType(var) @@ -339,6 +347,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, late, final, ;) listener: handleNoType(final) @@ -582,6 +592,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(}, null, augment, null, static, null, null, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, static, null, null, var, }) listener: handleNoType(var) @@ -597,6 +609,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, null, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, static, null, null, final, ;) listener: handleNoType(final) @@ -619,6 +633,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, null, const, const, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, static, null, null, const, ;) listener: handleNoType(const) @@ -658,6 +674,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, late, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, static, null, late, var, ;) listener: handleNoType(var) @@ -673,6 +691,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, late, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, static, null, late, final, ;) listener: handleNoType(final) @@ -945,6 +965,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(}, null, augment, null, null, null, null, var, var, Instance of 'NoType', field, DeclarationKind.Mixin, Mixin, false) listener: beginFields(DeclarationKind.Mixin, null, augment, null, null, null, null, var, }) listener: handleNoType(var) @@ -960,6 +982,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, null, final, final, Instance of 'NoType', field, DeclarationKind.Mixin, Mixin, false) listener: beginFields(DeclarationKind.Mixin, null, augment, null, null, null, null, final, ;) listener: handleNoType(final) @@ -982,6 +1006,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, null, const, const, Instance of 'NoType', field, DeclarationKind.Mixin, Mixin, false) listener: beginFields(DeclarationKind.Mixin, null, augment, null, null, null, null, const, ;) listener: handleNoType(const) @@ -1021,6 +1047,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, var, var, Instance of 'NoType', field, DeclarationKind.Mixin, Mixin, false) listener: beginFields(DeclarationKind.Mixin, null, augment, null, null, null, late, var, ;) listener: handleNoType(var) @@ -1036,6 +1064,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, final, final, Instance of 'NoType', field, DeclarationKind.Mixin, Mixin, false) listener: beginFields(DeclarationKind.Mixin, null, augment, null, null, null, late, final, ;) listener: handleNoType(final) @@ -1279,6 +1309,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(}, null, augment, null, static, null, null, var, var, Instance of 'NoType', field, DeclarationKind.Mixin, Mixin, false) listener: beginFields(DeclarationKind.Mixin, null, augment, null, static, null, null, var, }) listener: handleNoType(var) @@ -1294,6 +1326,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, null, final, final, Instance of 'NoType', field, DeclarationKind.Mixin, Mixin, false) listener: beginFields(DeclarationKind.Mixin, null, augment, null, static, null, null, final, ;) listener: handleNoType(final) @@ -1316,6 +1350,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, null, const, const, Instance of 'NoType', field, DeclarationKind.Mixin, Mixin, false) listener: beginFields(DeclarationKind.Mixin, null, augment, null, static, null, null, const, ;) listener: handleNoType(const) @@ -1355,6 +1391,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, late, var, var, Instance of 'NoType', field, DeclarationKind.Mixin, Mixin, false) listener: beginFields(DeclarationKind.Mixin, null, augment, null, static, null, late, var, ;) listener: handleNoType(var) @@ -1370,6 +1408,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, late, final, final, Instance of 'NoType', field, DeclarationKind.Mixin, Mixin, false) listener: beginFields(DeclarationKind.Mixin, null, augment, null, static, null, late, final, ;) listener: handleNoType(final) diff --git a/pkg/front_end/parser_testcases/augmentation/member_errors.dart.intertwined.expect b/pkg/front_end/parser_testcases/augmentation/member_errors.dart.intertwined.expect index 3161f4d9ed5..60da8d33bb9 100644 --- a/pkg/front_end/parser_testcases/augmentation/member_errors.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/augmentation/member_errors.dart.intertwined.expect @@ -668,6 +668,8 @@ parseUnit(class) reportRecoverableErrorWithToken(augment, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[DuplicatedModifier, The modifier 'augment' was already specified., Try removing all but one occurrence of the modifier., {lexeme: augment}], augment, augment) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, null, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, null, var, ;) listener: handleNoType(var) @@ -685,6 +687,8 @@ parseUnit(class) reportRecoverableError(external, Message[ConflictingModifiers, Members can't be declared to be both 'external' and 'augment'., Try removing one of the keywords., {string: external, string2: augment}]) listener: handleRecoverableError(Message[ConflictingModifiers, Members can't be declared to be both 'external' and 'augment'., Try removing one of the keywords., {string: external, string2: augment}], external, external) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, external, null, null, null, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, external, null, null, null, var, ;) listener: handleNoType(var) @@ -702,6 +706,8 @@ parseUnit(class) reportRecoverableError(augment, Message[ConflictingModifiers, Members can't be declared to be both 'augment' and 'external'., Try removing one of the keywords., {string: augment, string2: external}]) listener: handleRecoverableError(Message[ConflictingModifiers, Members can't be declared to be both 'augment' and 'external'., Try removing one of the keywords., {string: augment, string2: external}], augment, augment) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, null, external, null, null, null, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, null, external, null, null, null, var, ;) listener: handleNoType(var) @@ -719,6 +725,8 @@ parseUnit(class) reportRecoverableErrorWithToken(augment, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[DuplicatedModifier, The modifier 'augment' was already specified., Try removing all but one occurrence of the modifier., {lexeme: augment}], augment, augment) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, null, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, null, final, ;) listener: handleNoType(final) @@ -743,6 +751,8 @@ parseUnit(class) reportRecoverableError(external, Message[ConflictingModifiers, Members can't be declared to be both 'external' and 'augment'., Try removing one of the keywords., {string: external, string2: augment}]) listener: handleRecoverableError(Message[ConflictingModifiers, Members can't be declared to be both 'external' and 'augment'., Try removing one of the keywords., {string: external, string2: augment}], external, external) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, external, null, null, null, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, external, null, null, null, final, ;) listener: handleNoType(final) @@ -760,6 +770,8 @@ parseUnit(class) reportRecoverableError(augment, Message[ConflictingModifiers, Members can't be declared to be both 'augment' and 'external'., Try removing one of the keywords., {string: augment, string2: external}]) listener: handleRecoverableError(Message[ConflictingModifiers, Members can't be declared to be both 'augment' and 'external'., Try removing one of the keywords., {string: augment, string2: external}], augment, augment) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, null, external, null, null, null, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, null, external, null, null, null, final, ;) listener: handleNoType(final) @@ -777,6 +789,8 @@ parseUnit(class) reportRecoverableErrorWithToken(augment, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[DuplicatedModifier, The modifier 'augment' was already specified., Try removing all but one occurrence of the modifier., {lexeme: augment}], augment, augment) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, null, const, const, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, null, const, ;) listener: handleNoType(const) @@ -801,6 +815,8 @@ parseUnit(class) reportRecoverableError(external, Message[ConflictingModifiers, Members can't be declared to be both 'external' and 'augment'., Try removing one of the keywords., {string: external, string2: augment}]) listener: handleRecoverableError(Message[ConflictingModifiers, Members can't be declared to be both 'external' and 'augment'., Try removing one of the keywords., {string: external, string2: augment}], external, external) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(field) parseFields(;, null, augment, external, null, null, null, const, const, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, external, null, null, null, const, ;) listener: handleNoType(const) @@ -820,6 +836,8 @@ parseUnit(class) reportRecoverableError(augment, Message[ConflictingModifiers, Members can't be declared to be both 'augment' and 'external'., Try removing one of the keywords., {string: augment, string2: external}]) listener: handleRecoverableError(Message[ConflictingModifiers, Members can't be declared to be both 'augment' and 'external'., Try removing one of the keywords., {string: augment, string2: external}], augment, augment) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(field) parseFields(;, null, null, external, null, null, null, const, const, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, null, external, null, null, null, const, ;) listener: handleNoType(const) @@ -896,6 +914,8 @@ parseUnit(class) reportRecoverableErrorWithToken(augment, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[DuplicatedModifier, The modifier 'augment' was already specified., Try removing all but one occurrence of the modifier., {lexeme: augment}], augment, augment) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, late, var, ;) listener: handleNoType(var) @@ -911,6 +931,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, late, var, ;) listener: handleNoType(var) @@ -926,6 +948,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, late, var, ;) listener: handleNoType(var) @@ -943,6 +967,8 @@ parseUnit(class) reportRecoverableErrorWithToken(augment, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[DuplicatedModifier, The modifier 'augment' was already specified., Try removing all but one occurrence of the modifier., {lexeme: augment}], augment, augment) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, late, final, ;) listener: handleNoType(final) @@ -958,6 +984,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, late, final, ;) listener: handleNoType(final) @@ -973,6 +1001,8 @@ parseUnit(class) listener: beginMetadataStar(augment) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, null, null, late, final, ;) listener: handleNoType(final) @@ -1489,6 +1519,8 @@ parseUnit(class) reportRecoverableErrorWithToken(augment, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[DuplicatedModifier, The modifier 'augment' was already specified., Try removing all but one occurrence of the modifier., {lexeme: augment}], augment, augment) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(}, null, augment, null, static, null, null, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, static, null, null, var, }) listener: handleNoType(var) @@ -1506,6 +1538,8 @@ parseUnit(class) reportRecoverableError(augment, Message[ModifierOutOfOrder, The modifier 'augment' should be before the modifier 'static'., Try re-ordering the modifiers., {string: augment, string2: static}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'augment' should be before the modifier 'static'., Try re-ordering the modifiers., {string: augment, string2: static}], augment, augment) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, null, null, static, null, null, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, null, null, static, null, null, var, ;) listener: handleNoType(var) @@ -1523,6 +1557,8 @@ parseUnit(class) reportRecoverableErrorWithToken(augment, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[DuplicatedModifier, The modifier 'augment' was already specified., Try removing all but one occurrence of the modifier., {lexeme: augment}], augment, augment) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, null, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, static, null, null, final, ;) listener: handleNoType(final) @@ -1547,6 +1583,8 @@ parseUnit(class) reportRecoverableError(augment, Message[ModifierOutOfOrder, The modifier 'augment' should be before the modifier 'static'., Try re-ordering the modifiers., {string: augment, string2: static}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'augment' should be before the modifier 'static'., Try re-ordering the modifiers., {string: augment, string2: static}], augment, augment) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, null, null, static, null, null, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, null, null, static, null, null, final, ;) listener: handleNoType(final) @@ -1571,6 +1609,8 @@ parseUnit(class) reportRecoverableErrorWithToken(augment, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[DuplicatedModifier, The modifier 'augment' was already specified., Try removing all but one occurrence of the modifier., {lexeme: augment}], augment, augment) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, null, const, const, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, static, null, null, const, ;) listener: handleNoType(const) @@ -1595,6 +1635,8 @@ parseUnit(class) reportRecoverableError(augment, Message[ModifierOutOfOrder, The modifier 'augment' should be before the modifier 'static'., Try re-ordering the modifiers., {string: augment, string2: static}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'augment' should be before the modifier 'static'., Try re-ordering the modifiers., {string: augment, string2: static}], augment, augment) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(field) parseFields(;, null, null, null, static, null, null, const, const, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, null, null, static, null, null, const, ;) listener: handleNoType(const) @@ -1657,6 +1699,8 @@ parseUnit(class) reportRecoverableErrorWithToken(augment, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[DuplicatedModifier, The modifier 'augment' was already specified., Try removing all but one occurrence of the modifier., {lexeme: augment}], augment, augment) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, late, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, static, null, late, var, ;) listener: handleNoType(var) @@ -1674,6 +1718,8 @@ parseUnit(class) reportRecoverableError(augment, Message[ModifierOutOfOrder, The modifier 'augment' should be before the modifier 'static'., Try re-ordering the modifiers., {string: augment, string2: static}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'augment' should be before the modifier 'static'., Try re-ordering the modifiers., {string: augment, string2: static}], augment, augment) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, null, null, static, null, late, var, var, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, null, null, static, null, late, var, ;) listener: handleNoType(var) @@ -1691,6 +1737,8 @@ parseUnit(class) reportRecoverableErrorWithToken(augment, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[DuplicatedModifier, The modifier 'augment' was already specified., Try removing all but one occurrence of the modifier., {lexeme: augment}], augment, augment) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, static, null, late, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, augment, null, static, null, late, final, ;) listener: handleNoType(final) @@ -1708,6 +1756,8 @@ parseUnit(class) reportRecoverableError(augment, Message[ModifierOutOfOrder, The modifier 'augment' should be before the modifier 'static'., Try re-ordering the modifiers., {string: augment, string2: static}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'augment' should be before the modifier 'static'., Try re-ordering the modifiers., {string: augment, string2: static}], augment, augment) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, null, null, static, null, late, final, final, Instance of 'NoType', field, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, null, null, static, null, late, final, ;) listener: handleNoType(final) diff --git a/pkg/front_end/parser_testcases/augmentation/top_level_declarations.dart.intertwined.expect b/pkg/front_end/parser_testcases/augmentation/top_level_declarations.dart.intertwined.expect index 0c268823be7..5dd2b2494bf 100644 --- a/pkg/front_end/parser_testcases/augmentation/top_level_declarations.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/augmentation/top_level_declarations.dart.intertwined.expect @@ -203,6 +203,8 @@ parseUnit(augment) listener: endMetadataStar(0) parseTopLevelMemberImpl(}) listener: beginTopLevelMember(augment) + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(}, null, augment, null, null, null, null, var, var, Instance of 'NoType', field, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, augment, null, null, null, null, var, }) listener: handleNoType(var) @@ -218,6 +220,8 @@ parseUnit(augment) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(augment) + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, null, final, final, Instance of 'NoType', field, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, augment, null, null, null, null, final, ;) listener: handleNoType(final) @@ -240,6 +244,8 @@ parseUnit(augment) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(augment) + skipOuterPattern(const) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, null, const, const, Instance of 'NoType', field, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, augment, null, null, null, null, const, ;) listener: handleNoType(const) @@ -279,6 +285,8 @@ parseUnit(augment) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(augment) + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, var, var, Instance of 'NoType', field, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, augment, null, null, null, late, var, ;) listener: handleNoType(var) @@ -294,6 +302,8 @@ parseUnit(augment) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(augment) + skipOuterPattern(final) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, late, final, final, Instance of 'NoType', field, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, augment, null, null, null, late, final, ;) listener: handleNoType(final) diff --git a/pkg/front_end/parser_testcases/augmentation/top_level_errors.dart.intertwined.expect b/pkg/front_end/parser_testcases/augmentation/top_level_errors.dart.intertwined.expect index 8ca3a15eb38..d525073715c 100644 --- a/pkg/front_end/parser_testcases/augmentation/top_level_errors.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/augmentation/top_level_errors.dart.intertwined.expect @@ -579,6 +579,8 @@ parseUnit(augment) listener: beginTopLevelMember(augment) reportRecoverableErrorWithToken(augment, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[DuplicatedModifier, The modifier 'augment' was already specified., Try removing all but one occurrence of the modifier., {lexeme: augment}], augment, augment) + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, null, null, null, null, var, var, Instance of 'NoType', field, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, augment, null, null, null, null, var, ;) listener: handleNoType(var) @@ -596,6 +598,8 @@ parseUnit(augment) listener: beginTopLevelMember(augment) reportRecoverableError(external, Message[ConflictingModifiers, Members can't be declared to be both 'external' and 'augment'., Try removing one of the keywords., {string: external, string2: augment}]) listener: handleRecoverableError(Message[ConflictingModifiers, Members can't be declared to be both 'external' and 'augment'., Try removing one of the keywords., {string: external, string2: augment}], external, external) + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, external, null, null, null, var, var, Instance of 'NoType', field, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, augment, external, null, null, null, var, ;) listener: handleNoType(var) @@ -613,6 +617,8 @@ parseUnit(augment) listener: beginTopLevelMember(external) reportRecoverableError(augment, Message[ConflictingModifiers, Members can't be declared to be both 'augment' and 'external'., Try removing one of the keywords., {string: augment, string2: external}]) listener: handleRecoverableError(Message[ConflictingModifiers, Members can't be declared to be both 'augment' and 'external'., Try removing one of the keywords., {string: augment, string2: external}], augment, augment) + skipOuterPattern(var) + skipObjectPatternRest(field) parseFields(;, null, augment, external, null, null, null, var, var, Instance of 'NoType', field, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, augment, external, null, null, null, var, ;) listener: handleNoType(var) diff --git a/pkg/front_end/parser_testcases/enhanced_enums/entries_with_type_arguments.dart.intertwined.expect b/pkg/front_end/parser_testcases/enhanced_enums/entries_with_type_arguments.dart.intertwined.expect index baa89d0146e..48dcd88f948 100644 --- a/pkg/front_end/parser_testcases/enhanced_enums/entries_with_type_arguments.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/enhanced_enums/entries_with_type_arguments.dart.intertwined.expect @@ -120,6 +120,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -149,6 +151,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(named) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_22314.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_22314.dart.intertwined.expect index 3a87169c090..aa6ee8095ab 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_22314.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_22314.dart.intertwined.expect @@ -8,6 +8,8 @@ parseUnit(const) listener: endMetadataStar(0) parseTopLevelMemberImpl() listener: beginTopLevelMember(const) + skipOuterPattern(const) + skipObjectPatternRest(annotation) parseFields(, null, null, null, null, null, null, const, const, Instance of 'NoType', annotation, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, const, ) listener: handleNoType(const) @@ -53,6 +55,8 @@ parseUnit(const) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(String) parseFields({, null, null, null, null, null, null, final, final, Instance of 'SimpleType', message, DeclarationKind.Class, Annotation, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) listener: handleIdentifier(String, typeReference) @@ -70,6 +74,8 @@ parseUnit(const) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(Annotation) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, Annotation, DeclarationKind.Class, Annotation, false) listener: beginMethod(DeclarationKind.Class, null, null, null, null, const, null, Annotation) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_42229_prime_6.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_42229_prime_6.dart.intertwined.expect index dc2d1064f43..7d80f5db4de 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_42229_prime_6.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_42229_prime_6.dart.intertwined.expect @@ -8,6 +8,8 @@ parseUnit(const) listener: endMetadataStar(0) parseTopLevelMemberImpl() listener: beginTopLevelMember(const) + skipOuterPattern(const) + skipObjectPatternRest(foo) parseFields(, null, null, null, null, null, null, const, const, Instance of 'NoType', foo, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, const, ) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251.dart.intertwined.expect index d66bea5bde2..c64a0b82ed0 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields({, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo1, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) ensureIdentifier(final, typeReference) @@ -82,6 +84,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo2, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -127,6 +131,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo3, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -166,6 +172,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo4, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -220,6 +228,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo5, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -263,6 +273,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo6, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -329,6 +341,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo7, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -383,6 +397,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo8, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -443,6 +459,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo9, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_const.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_const.dart.intertwined.expect index 2ff51ab0054..248227e8e1e 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_const.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_const.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields({, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo1, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) ensureIdentifier(final, typeReference) @@ -81,6 +83,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo2, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -129,6 +133,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo3, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -167,6 +173,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo4, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -223,6 +231,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo5, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -268,6 +278,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo6, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -333,6 +345,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo7, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -386,6 +400,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo8, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -449,6 +465,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo9, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_list.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_list.dart.intertwined.expect index 93483edb62e..f2d415dff02 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_list.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_list.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields({, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo1, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) listener: handleIdentifier(List, typeReference) @@ -78,6 +80,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo2, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -119,6 +123,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo3, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -157,6 +163,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo4, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -204,6 +212,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo5, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -243,6 +253,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo6, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -293,6 +305,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo7, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -336,6 +350,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo8, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -380,6 +396,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo9, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_const.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_const.dart.intertwined.expect index 5c3557d1d10..177637e3d33 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_const.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_const.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields({, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo1, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) listener: handleIdentifier(List, typeReference) @@ -77,6 +79,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo2, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -121,6 +125,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo3, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -158,6 +164,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo4, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -207,6 +215,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo5, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -248,6 +258,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo6, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -297,6 +309,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo7, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -337,6 +351,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo8, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -384,6 +400,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo9, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_new.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_new.dart.intertwined.expect index 9488bf5032c..9ff9af37b44 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_new.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_new.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields({, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo1, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) listener: handleIdentifier(List, typeReference) @@ -77,6 +79,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo2, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -123,6 +127,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo3, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -160,6 +166,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo4, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -210,6 +218,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo5, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -252,6 +262,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo6, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -301,6 +313,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo7, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -341,6 +355,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo8, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) @@ -390,6 +406,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(List) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo9, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(List, typeReference) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_new.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_new.dart.intertwined.expect index 76650bb6672..ee17bc9dfea 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_new.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_new.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields({, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo1, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) ensureIdentifier(final, typeReference) @@ -81,6 +83,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo2, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -131,6 +135,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo3, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -169,6 +175,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo4, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -226,6 +234,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo5, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -272,6 +282,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo6, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -337,6 +349,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo7, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -390,6 +404,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo8, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) @@ -455,6 +471,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Map) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', foo9, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) ensureIdentifier(final, typeReference) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_set.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_set.dart.intertwined.expect index 2b60287fe10..b2637217d95 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_set.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_set.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields({, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo1, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) listener: handleIdentifier(Set, typeReference) @@ -75,6 +77,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo2, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -113,6 +117,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo3, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -148,6 +154,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo4, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -195,6 +203,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo5, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -234,6 +244,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo6, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -284,6 +296,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo7, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -325,6 +339,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo8, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -369,6 +385,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo9, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_const.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_const.dart.intertwined.expect index 8e95984932f..cd21cfe8dad 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_const.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_const.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields({, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo1, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) listener: handleIdentifier(Set, typeReference) @@ -74,6 +76,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo2, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -115,6 +119,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo3, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -149,6 +155,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo4, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -198,6 +206,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo5, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -239,6 +249,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo6, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -288,6 +300,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo7, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -328,6 +342,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo8, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -375,6 +391,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo9, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_new.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_new.dart.intertwined.expect index 3b786f283be..6f259066ff6 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_new.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_new.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields({, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo1, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) listener: handleIdentifier(Set, typeReference) @@ -74,6 +76,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo2, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -117,6 +121,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo3, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -151,6 +157,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo4, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -201,6 +209,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo5, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -243,6 +253,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo6, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -292,6 +304,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo7, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -332,6 +346,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo8, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) @@ -381,6 +397,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(Set) parseFields(;, null, null, null, null, null, null, final, final, Instance of 'SimpleTypeWith1Argument', foo9, DeclarationKind.Class, F, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, ;) listener: handleIdentifier(Set, typeReference) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_1.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_1.dart.intertwined.expect index 630c163caad..5dc53037d3a 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_1.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_1.dart.intertwined.expect @@ -62,6 +62,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -91,6 +93,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_comma.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_comma.dart.intertwined.expect index db143e0ee35..b46f102e122 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_comma.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_comma.dart.intertwined.expect @@ -83,6 +83,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -112,6 +114,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_comma_ok.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_comma_ok.dart.intertwined.expect index a4b84415b05..b186b968041 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_comma_ok.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_comma_ok.dart.intertwined.expect @@ -76,6 +76,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -105,6 +107,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_ok.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_ok.dart.intertwined.expect index 2dc3c2974c6..25df2199c8b 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_ok.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_1_ok.dart.intertwined.expect @@ -55,6 +55,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -84,6 +86,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_2.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_2.dart.intertwined.expect index ee08e7d8940..45a53a952b2 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_2.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_2.dart.intertwined.expect @@ -57,6 +57,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -86,6 +88,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_comma.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_comma.dart.intertwined.expect index d71d5be290f..cc43dff417b 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_comma.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_comma.dart.intertwined.expect @@ -78,6 +78,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -107,6 +109,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_comma_ok.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_comma_ok.dart.intertwined.expect index 647eb09cfda..b4f30a74700 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_comma_ok.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_comma_ok.dart.intertwined.expect @@ -75,6 +75,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -104,6 +106,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_ok.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_ok.dart.intertwined.expect index c6e6c7ec364..8daeb2246cd 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_ok.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_2_ok.dart.intertwined.expect @@ -54,6 +54,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -83,6 +85,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_3.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_3.dart.intertwined.expect index 66cee8728fc..bd0d7b0bef6 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_3.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_3.dart.intertwined.expect @@ -50,6 +50,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -79,6 +81,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_comma.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_comma.dart.intertwined.expect index 77c20d597f3..9d78cefd080 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_comma.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_comma.dart.intertwined.expect @@ -67,6 +67,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -96,6 +98,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_comma_ok.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_comma_ok.dart.intertwined.expect index 47a0c9e54fb..c5002968800 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_comma_ok.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_comma_ok.dart.intertwined.expect @@ -60,6 +60,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -89,6 +91,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_ok.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_ok.dart.intertwined.expect index d7a1b98c9cf..334e9194e5f 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_ok.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48380_3_ok.dart.intertwined.expect @@ -43,6 +43,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(E) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) @@ -72,6 +74,8 @@ parseUnit(enum) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(foo) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, E, DeclarationKind.Enum, E, false) listener: beginMethod(DeclarationKind.Enum, null, null, null, null, const, null, E) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48411.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48411.dart.intertwined.expect index 1264eb152c3..b8ef07c5b25 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48411.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48411.dart.intertwined.expect @@ -895,6 +895,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(int) parseFields({, null, null, null, null, null, null, final, final, Instance of 'SimpleType', y, DeclarationKind.Class, E, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) listener: handleIdentifier(int, typeReference) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_48411_prime.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_48411_prime.dart.intertwined.expect index 91a4731a4ff..29800dbca4e 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_48411_prime.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_48411_prime.dart.intertwined.expect @@ -880,6 +880,8 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(int) parseFields({, null, null, null, null, null, null, final, final, Instance of 'SimpleType', y, DeclarationKind.Class, E, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) listener: handleIdentifier(int, typeReference) diff --git a/pkg/front_end/parser_testcases/general/function_reference_following_token.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/function_reference_following_token.dart.intertwined.expect index e11944ee6e1..b12da1119b3 100644 --- a/pkg/front_end/parser_testcases/general/function_reference_following_token.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/general/function_reference_following_token.dart.intertwined.expect @@ -8,6 +8,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl() listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_closeBrace) parseFields(, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_closeBrace, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ) listener: handleNoType(var) @@ -53,6 +55,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_closeBracket) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_closeBracket, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -98,6 +102,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_closeParen) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_closeParen, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -153,6 +159,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_colon) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_colon, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -205,6 +213,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_comma) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_comma, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -256,6 +266,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_equals) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_equals, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -301,6 +313,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_not_equals) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_not_equals, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -346,6 +360,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_openParen) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_openParen, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -386,6 +402,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_period_methodInvocation) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_period_methodInvocation, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -428,6 +446,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_period_methodInvocation_generic) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_period_methodInvocation_generic, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -485,6 +505,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_period_propertyAccess) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_period_propertyAccess, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -534,6 +556,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(typeArgs_semicolon) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', typeArgs_semicolon, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -572,6 +596,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_ampersand) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_ampersand, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -675,6 +701,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_as) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_as, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -764,6 +792,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_asterisk) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_asterisk, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -867,6 +897,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_bang_openBracket) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_bang_openBracket, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -964,6 +996,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_bang_paren) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_bang_paren, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1063,6 +1097,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_bar) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_bar, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1166,6 +1202,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_caret) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_caret, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1269,6 +1307,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_is) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_is, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1368,6 +1408,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_lessThan) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_lessThan, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1432,6 +1474,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_minus) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_minus, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1522,6 +1566,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_openBracket) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_openBracket, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1616,6 +1662,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_openBracket_error) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_openBracket_error, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1726,6 +1774,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_openBracket_unambiguous) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_openBracket_unambiguous, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1833,6 +1883,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_percent) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_percent, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1936,6 +1988,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_period_period) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_period_period, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -2041,6 +2095,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_plus) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_plus, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -2146,6 +2202,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_question) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_question, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -2252,6 +2310,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_question_period_methodInvocation) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_question_period_methodInvocation, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -2356,6 +2416,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_question_period_methodInvocation_generic) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_question_period_methodInvocation_generic, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -2464,6 +2526,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_question_period_period) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_question_period_period, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -2574,6 +2638,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_question_period_propertyAccess) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_question_period_propertyAccess, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -2674,6 +2740,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_question_question) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_question_question, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -2777,6 +2845,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_slash) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_slash, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -2880,6 +2950,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(operators_tilde_slash) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', operators_tilde_slash, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) diff --git a/pkg/front_end/parser_testcases/general/function_reference_kinds.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/function_reference_kinds.dart.intertwined.expect index 7c8663673f6..1364ce9fa29 100644 --- a/pkg/front_end/parser_testcases/general/function_reference_kinds.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/general/function_reference_kinds.dart.intertwined.expect @@ -8,6 +8,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl() listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(simpleIdentifier) parseFields(, null, null, null, null, null, null, var, var, Instance of 'NoType', simpleIdentifier, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ) listener: handleNoType(var) @@ -46,6 +48,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(method) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', method, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -99,6 +103,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(prefixedIdentifier) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', prefixedIdentifier, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -148,6 +154,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(three_identifiers) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', three_identifiers, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) diff --git a/pkg/front_end/parser_testcases/general/new_as_identifier.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/new_as_identifier.dart.intertwined.expect index afedef6e517..5cc55703e78 100644 --- a/pkg/front_end/parser_testcases/general/new_as_identifier.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/general/new_as_identifier.dart.intertwined.expect @@ -624,6 +624,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(}) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_const) parseFields(}, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_const, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, }) listener: handleNoType(var) @@ -665,6 +667,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_const_generic) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_const_generic, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -707,6 +711,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_const_prefixed) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_const_prefixed, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -749,6 +755,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_const_prefixed_generic) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_const_prefixed_generic, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -795,6 +803,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_explicit) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_explicit, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -837,6 +847,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_explicit_generic) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_explicit_generic, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -880,6 +892,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_explicit_prefixed) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_explicit_prefixed, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -923,6 +937,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_explicit_prefixed_generic) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_explicit_prefixed_generic, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -970,6 +986,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_implicit) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_implicit, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1016,6 +1034,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_implicit_generic) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_implicit_generic, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1057,6 +1077,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_implicit_prefixed) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_implicit_prefixed, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1114,6 +1136,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_invocation_implicit_prefixed_generic) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_invocation_implicit_prefixed_generic, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1159,6 +1183,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_tearoff) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_tearoff, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1201,6 +1227,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_tearoff_generic) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_tearoff_generic, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1249,6 +1277,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_tearoff_generic_method_invocation) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_tearoff_generic_method_invocation, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1312,6 +1342,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_tearoff_method_invocation) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_tearoff_method_invocation, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1369,6 +1401,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_tearoff_prefixed) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_tearoff_prefixed, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1422,6 +1456,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_tearoff_prefixed_generic) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_tearoff_prefixed_generic, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1481,6 +1517,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_tearoff_prefixed_generic_method_invocation) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_tearoff_prefixed_generic_method_invocation, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -1555,6 +1593,8 @@ parseUnit(class) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(constructor_tearoff_prefixed_method_invocation) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', constructor_tearoff_prefixed_method_invocation, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ;) listener: handleNoType(var) diff --git a/pkg/front_end/parser_testcases/nnbd/error_recovery/abstract_placement.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/error_recovery/abstract_placement.dart.intertwined.expect index 8f2a6a65502..c4000060b4c 100644 --- a/pkg/front_end/parser_testcases/nnbd/error_recovery/abstract_placement.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/nnbd/error_recovery/abstract_placement.dart.intertwined.expect @@ -33,6 +33,8 @@ parseUnit(abstract) reportRecoverableError(abstract, Message[ModifierOutOfOrder, The modifier 'abstract' should be before the modifier 'final'., Try re-ordering the modifiers., {string: abstract, string2: final}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'abstract' should be before the modifier 'final'., Try re-ordering the modifiers., {string: abstract, string2: final}], abstract, abstract) listener: beginMember() + skipOuterPattern(abstract) + skipObjectPatternRest(int) parseFields({, abstract, null, null, null, null, null, final, abstract, Instance of 'SimpleType', i1, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, abstract, null, null, null, null, null, final, {) listener: handleIdentifier(int, typeReference) @@ -52,6 +54,8 @@ parseUnit(abstract) reportRecoverableError(abstract, Message[ModifierOutOfOrder, The modifier 'abstract' should be before the modifier 'final'., Try re-ordering the modifiers., {string: abstract, string2: final}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'abstract' should be before the modifier 'final'., Try re-ordering the modifiers., {string: abstract, string2: final}], abstract, abstract) listener: beginMember() + skipOuterPattern(abstract) + skipObjectPatternRest(i2) parseFields(;, abstract, null, null, null, null, null, final, abstract, Instance of 'NoType', i2, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, abstract, null, null, null, null, null, final, ;) listener: handleNoType(abstract) @@ -88,6 +92,8 @@ parseUnit(abstract) reportRecoverableError(abstract, Message[ModifierOutOfOrder, The modifier 'abstract' should be before the modifier 'covariant'., Try re-ordering the modifiers., {string: abstract, string2: covariant}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'abstract' should be before the modifier 'covariant'., Try re-ordering the modifiers., {string: abstract, string2: covariant}], abstract, abstract) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(i4) parseFields(;, abstract, null, null, null, covariant, null, var, var, Instance of 'NoType', i4, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, abstract, null, null, null, covariant, null, var, ;) listener: handleNoType(var) @@ -105,6 +111,8 @@ parseUnit(abstract) reportRecoverableError(abstract, Message[ModifierOutOfOrder, The modifier 'abstract' should be before the modifier 'final'., Try re-ordering the modifiers., {string: abstract, string2: final}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'abstract' should be before the modifier 'final'., Try re-ordering the modifiers., {string: abstract, string2: final}], abstract, abstract) listener: beginMember() + skipOuterPattern(abstract) + skipObjectPatternRest(i5) parseFields(;, abstract, null, null, null, null, null, final, abstract, Instance of 'NoType', i5, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, abstract, null, null, null, null, null, final, ;) listener: handleNoType(abstract) @@ -122,6 +130,8 @@ parseUnit(abstract) reportRecoverableError(abstract, Message[ModifierOutOfOrder, The modifier 'abstract' should be before the modifier 'var'., Try re-ordering the modifiers., {string: abstract, string2: var}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'abstract' should be before the modifier 'var'., Try re-ordering the modifiers., {string: abstract, string2: var}], abstract, abstract) listener: beginMember() + skipOuterPattern(abstract) + skipObjectPatternRest(i6) parseFields(;, abstract, null, null, null, null, null, var, abstract, Instance of 'NoType', i6, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, abstract, null, null, null, null, null, var, ;) listener: handleNoType(abstract) @@ -184,6 +194,8 @@ parseUnit(abstract) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'abstract' should be before the modifier 'var'., Try re-ordering the modifiers., {string: abstract, string2: var}], abstract, abstract) reportRecoverableErrorWithToken(abstract, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[ExtraneousModifier, Can't have modifier 'abstract' here., Try removing 'abstract'., {lexeme: abstract}], abstract, abstract) + skipOuterPattern(abstract) + skipObjectPatternRest(foo) parseFields(}, null, null, null, null, null, null, var, abstract, Instance of 'NoType', foo, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, }) listener: handleNoType(abstract) diff --git a/pkg/front_end/parser_testcases/nnbd/error_recovery/external_placement.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/error_recovery/external_placement.dart.intertwined.expect index be6ed463e77..25a15786b2a 100644 --- a/pkg/front_end/parser_testcases/nnbd/error_recovery/external_placement.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/nnbd/error_recovery/external_placement.dart.intertwined.expect @@ -10,6 +10,8 @@ parseUnit(final) listener: beginTopLevelMember(final) reportRecoverableError(external, Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'final'., Try re-ordering the modifiers., {string: external, string2: final}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'final'., Try re-ordering the modifiers., {string: external, string2: final}], external, external) + skipOuterPattern(external) + skipObjectPatternRest(int) parseFields(, null, null, external, null, null, null, final, external, Instance of 'SimpleType', i1, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, external, null, null, null, final, ) listener: handleIdentifier(int, typeReference) @@ -29,6 +31,8 @@ parseUnit(final) listener: beginTopLevelMember(var) reportRecoverableError(external, Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'var'., Try re-ordering the modifiers., {string: external, string2: var}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'var'., Try re-ordering the modifiers., {string: external, string2: var}], external, external) + skipOuterPattern(external) + skipObjectPatternRest(i2) parseFields(;, null, null, external, null, null, null, var, external, Instance of 'NoType', i2, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, external, null, null, null, var, ;) listener: handleNoType(external) @@ -88,6 +92,8 @@ parseUnit(final) reportRecoverableError(external, Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'final'., Try re-ordering the modifiers., {string: external, string2: final}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'final'., Try re-ordering the modifiers., {string: external, string2: final}], external, external) listener: beginMember() + skipOuterPattern(external) + skipObjectPatternRest(int) parseFields(;, null, null, external, null, null, null, final, external, Instance of 'SimpleType', i4, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, null, null, external, null, null, null, final, ;) listener: handleIdentifier(int, typeReference) @@ -107,6 +113,8 @@ parseUnit(final) reportRecoverableError(external, Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'final'., Try re-ordering the modifiers., {string: external, string2: final}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'final'., Try re-ordering the modifiers., {string: external, string2: final}], external, external) listener: beginMember() + skipOuterPattern(external) + skipObjectPatternRest(i5) parseFields(;, null, null, external, null, null, null, final, external, Instance of 'NoType', i5, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, null, null, external, null, null, null, final, ;) listener: handleNoType(external) @@ -124,6 +132,8 @@ parseUnit(final) reportRecoverableError(external, Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'static'., Try re-ordering the modifiers., {string: external, string2: static}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'static'., Try re-ordering the modifiers., {string: external, string2: static}], external, external) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(i6) parseFields(;, null, null, external, static, null, null, final, final, Instance of 'NoType', i6, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, null, null, external, static, null, null, final, ;) listener: handleNoType(final) @@ -141,6 +151,8 @@ parseUnit(final) reportRecoverableError(external, Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'static'., Try re-ordering the modifiers., {string: external, string2: static}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'static'., Try re-ordering the modifiers., {string: external, string2: static}], external, external) listener: beginMember() + skipOuterPattern(external) + skipObjectPatternRest(i7) parseFields(;, null, null, external, static, null, null, final, external, Instance of 'NoType', i7, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, null, null, external, static, null, null, final, ;) listener: handleNoType(external) @@ -160,6 +172,8 @@ parseUnit(final) reportRecoverableError(external, Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'static'., Try re-ordering the modifiers., {string: external, string2: static}]) listener: handleRecoverableError(Message[ModifierOutOfOrder, The modifier 'external' should be before the modifier 'static'., Try re-ordering the modifiers., {string: external, string2: static}], external, external) listener: beginMember() + skipOuterPattern(external) + skipObjectPatternRest(i8) parseFields(;, null, null, external, static, null, null, final, external, Instance of 'NoType', i8, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, null, null, external, static, null, null, final, ;) listener: handleNoType(external) diff --git a/pkg/front_end/parser_testcases/nnbd/issue_39858_prime1.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_39858_prime1.dart.intertwined.expect index 581480f6461..c60633ec30b 100644 --- a/pkg/front_end/parser_testcases/nnbd/issue_39858_prime1.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/nnbd/issue_39858_prime1.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(var) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(x1) parseFields({, null, null, null, null, null, null, var, var, Instance of 'NoType', x1, DeclarationKind.Class, X, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, var, {) listener: handleNoType(var) @@ -46,6 +48,8 @@ parseUnit(class) listener: beginMetadataStar(static) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(x2) parseFields(;, null, null, null, static, null, null, var, var, Instance of 'NoType', x2, DeclarationKind.Class, X, false) listener: beginFields(DeclarationKind.Class, null, null, null, static, null, null, var, ;) listener: handleNoType(var) @@ -61,6 +65,8 @@ parseUnit(class) listener: beginMetadataStar(covariant) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(x3) parseFields(;, null, null, null, null, covariant, null, var, var, Instance of 'NoType', x3, DeclarationKind.Class, X, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, covariant, null, var, ;) listener: handleNoType(var) @@ -76,6 +82,8 @@ parseUnit(class) listener: beginMetadataStar(var) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(x4) parseFields(;, null, null, null, null, null, null, var, var, Instance of 'NoType', x4, DeclarationKind.Class, X, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, var, ;) listener: handleNoType(var) @@ -98,6 +106,8 @@ parseUnit(class) listener: beginMetadataStar(static) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(x5) parseFields(;, null, null, null, static, null, null, var, var, Instance of 'NoType', x5, DeclarationKind.Class, X, false) listener: beginFields(DeclarationKind.Class, null, null, null, static, null, null, var, ;) listener: handleNoType(var) @@ -120,6 +130,8 @@ parseUnit(class) listener: beginMetadataStar(covariant) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(var) + skipObjectPatternRest(x6) parseFields(;, null, null, null, null, covariant, null, var, var, Instance of 'NoType', x6, DeclarationKind.Class, X, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, covariant, null, var, ;) listener: handleNoType(var) diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40805_01.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40805_01.dart.intertwined.expect index e3e1844035c..cef4adc207d 100644 --- a/pkg/front_end/parser_testcases/nnbd/issue_40805_01.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/nnbd/issue_40805_01.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(covariant) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(int) parseFields({, null, null, null, null, covariant, late, final, final, Instance of 'SimpleType', x, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, covariant, late, final, {) listener: handleIdentifier(int, typeReference) diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40805_02.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40805_02.dart.intertwined.expect index 4f780746fbd..7b6b18b8109 100644 --- a/pkg/front_end/parser_testcases/nnbd/issue_40805_02.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/nnbd/issue_40805_02.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(covariant) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(int) parseFields({, null, null, null, null, covariant, late, final, final, Instance of 'SimpleType', x, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, covariant, late, final, {) listener: handleIdentifier(int, typeReference) diff --git a/pkg/front_end/parser_testcases/nnbd/issue_40805_03.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_40805_03.dart.intertwined.expect index b6b5130eeaf..b56dbbcd8b1 100644 --- a/pkg/front_end/parser_testcases/nnbd/issue_40805_03.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/nnbd/issue_40805_03.dart.intertwined.expect @@ -31,6 +31,8 @@ parseUnit(class) listener: beginMetadataStar(covariant) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(int) parseFields({, null, null, null, null, covariant, null, final, final, Instance of 'SimpleType', x, DeclarationKind.Class, C, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, covariant, null, final, {) reportRecoverableError(covariant, FinalAndCovariant) diff --git a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_4.dart.intertwined.expect b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_4.dart.intertwined.expect index dd39c5ee478..09eecb4f27c 100644 --- a/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_4.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/non-nnbd/issue_40267_conditional_4.dart.intertwined.expect @@ -8,6 +8,8 @@ parseUnit(var) listener: endMetadataStar(0) parseTopLevelMemberImpl() listener: beginTopLevelMember(var) + skipOuterPattern(var) + skipObjectPatternRest(a) parseFields(, null, null, null, null, null, null, var, var, Instance of 'NoType', a, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ) listener: handleNoType(var) diff --git a/pkg/front_end/parser_testcases/non-nnbd/use_late_in_non_nnbd.dart.intertwined.expect b/pkg/front_end/parser_testcases/non-nnbd/use_late_in_non_nnbd.dart.intertwined.expect index ff15f324d9a..d6ab3268bbb 100644 --- a/pkg/front_end/parser_testcases/non-nnbd/use_late_in_non_nnbd.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/non-nnbd/use_late_in_non_nnbd.dart.intertwined.expect @@ -72,6 +72,8 @@ parseUnit(int) indicatesMethodOrField(;) reportRecoverableErrorWithToken(late, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[UnexpectedModifierInNonNnbd, The modifier 'late' is only available in null safe libraries., null, {lexeme: late}], late, late) + skipOuterPattern(final) + skipObjectPatternRest(int) parseFields(late, null, null, null, null, null, late, final, final, Instance of 'SimpleType', x4, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, late, final, late) listener: handleIdentifier(int, typeReference) @@ -424,6 +426,8 @@ parseUnit(int) reportRecoverableErrorWithToken(late, Instance of 'Template<(Token) => Message>') listener: handleRecoverableError(Message[UnexpectedModifierInNonNnbd, The modifier 'late' is only available in null safe libraries., null, {lexeme: late}], late, late) listener: beginMember() + skipOuterPattern(final) + skipObjectPatternRest(int) parseFields(late, null, null, null, null, null, late, final, final, Instance of 'SimpleType', z4, DeclarationKind.Class, Foo, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, late, final, late) listener: handleIdentifier(int, typeReference) diff --git a/pkg/front_end/parser_testcases/patterns/const_patterns.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/const_patterns.dart.intertwined.expect index 3e84ca8ce5e..ec3a442184b 100644 --- a/pkg/front_end/parser_testcases/patterns/const_patterns.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/const_patterns.dart.intertwined.expect @@ -33,6 +33,8 @@ parseUnit(import) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(const) + skipOuterPattern(const) + skipObjectPatternRest(int) parseFields(;, null, null, null, null, null, null, const, const, Instance of 'SimpleType', value, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, const, ;) listener: handleIdentifier(int, typeReference) @@ -109,6 +111,8 @@ parseUnit(import) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(Class) parseMethod({, null, null, null, null, null, null, const, const, Instance of 'NoType', null, Class, DeclarationKind.Class, Class, false) listener: beginMethod(DeclarationKind.Class, null, null, null, null, const, null, Class) listener: handleNoType(const) @@ -152,6 +156,8 @@ parseUnit(import) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(named) parseMethod(;, null, null, null, null, null, null, const, const, Instance of 'NoType', null, Class, DeclarationKind.Class, Class, false) listener: beginMethod(DeclarationKind.Class, null, null, null, null, const, null, Class) listener: handleNoType(const) @@ -3074,6 +3080,8 @@ parseUnit(import) listener: beginMetadataStar(const) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(GenericClass) parseMethod({, null, null, null, null, null, null, const, const, Instance of 'NoType', null, GenericClass, DeclarationKind.Class, GenericClass, false) listener: beginMethod(DeclarationKind.Class, null, null, null, null, const, null, GenericClass) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/patterns/const_patterns_binary.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/const_patterns_binary.dart.intertwined.expect index 077d0e9276f..2db17870968 100644 --- a/pkg/front_end/parser_testcases/patterns/const_patterns_binary.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/const_patterns_binary.dart.intertwined.expect @@ -33,6 +33,8 @@ parseUnit(import) listener: endMetadataStar(0) parseTopLevelMemberImpl(;) listener: beginTopLevelMember(const) + skipOuterPattern(const) + skipObjectPatternRest(value) parseFields(;, null, null, null, null, null, null, const, const, Instance of 'NoType', value, DeclarationKind.TopLevel, null, false) listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, const, ;) listener: handleNoType(const) @@ -80,6 +82,8 @@ parseUnit(import) listener: beginMetadataStar(static) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) + skipObjectPatternRest(value) parseFields({, null, null, null, static, null, null, const, const, Instance of 'NoType', value, DeclarationKind.Class, Class, false) listener: beginFields(DeclarationKind.Class, null, null, null, static, null, null, const, {) listener: handleNoType(const) diff --git a/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart new file mode 100644 index 00000000000..b00506438d8 --- /dev/null +++ b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart @@ -0,0 +1,3 @@ +class C { + var (a, b) = (0, 1); +} diff --git a/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.expect b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.expect new file mode 100644 index 00000000000..8a76ac245af --- /dev/null +++ b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.expect @@ -0,0 +1,38 @@ +Problems reported: + +parser/patterns/patternVariableDeclaration_inClass:2:7: A pattern variable declaration may not appear outside a function or method. + var (a, b) = (0, 1); + ^^^^^^ + +beginCompilationUnit(class) + beginMetadataStar(class) + endMetadataStar(0) + beginClassOrMixinOrNamedMixinApplicationPrelude(class) + handleIdentifier(C, classOrMixinDeclaration) + handleNoTypeVariables({) + beginClassDeclaration(class, null, null, null, null, null, null, null, null, null, C) + handleNoType(C) + handleClassExtends(null, 1) + handleClassNoWithClause() + handleImplements(null, 0) + handleClassHeader(class, class, null) + beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {) + beginMetadataStar(var) + endMetadataStar(0) + beginMember() + handleRecoverableError(PatternVariableDeclarationOutsideFunctionOrMethod, (, )) + beginFields(DeclarationKind.Class, null, null, null, null, null, null, var, {) + handleNoType(var) + handleIdentifier(, fieldDeclaration) + beginFieldInitializer(=) + beginParenthesizedExpressionOrRecordLiteral(() + handleLiteralInt(0) + handleLiteralInt(1) + endRecordLiteral((, 2, null) + endFieldInitializer(=, ;) + endClassFields(null, null, null, null, null, null, var, 1, var, ;) + endMember() + endClassOrMixinOrExtensionBody(DeclarationKind.Class, 1, {, }) + endClassDeclaration(class, }) + endTopLevelDeclaration() +endCompilationUnit(1, ) diff --git a/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.intertwined.expect new file mode 100644 index 00000000000..fe418c233b1 --- /dev/null +++ b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.intertwined.expect @@ -0,0 +1,81 @@ +parseUnit(class) + skipErrorTokens(class) + listener: beginCompilationUnit(class) + syntheticPreviousToken(class) + parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext') + parseMetadataStar() + listener: beginMetadataStar(class) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(, class, null, null, null, null, null, Instance of 'DirectiveContext') + parseClassOrNamedMixinApplication(null, null, null, null, null, null, null, null, null, class) + listener: beginClassOrMixinOrNamedMixinApplicationPrelude(class) + ensureIdentifier(class, classOrMixinDeclaration) + listener: handleIdentifier(C, classOrMixinDeclaration) + listener: handleNoTypeVariables({) + listener: beginClassDeclaration(class, null, null, null, null, null, null, null, null, null, C) + parseClass(C, class, class, C) + parseClassHeaderOpt(C, class, class) + parseClassExtendsOpt(C) + listener: handleNoType(C) + listener: handleClassExtends(null, 1) + parseClassWithClauseOpt(C) + listener: handleClassNoWithClause() + parseClassOrMixinOrEnumImplementsOpt(C) + listener: handleImplements(null, 0) + listener: handleClassHeader(class, class, null) + parseClassOrMixinOrExtensionBody(C, DeclarationKind.Class, C) + listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {) + notEofOrValue(}, var) + parseClassOrMixinOrExtensionOrEnumMemberImpl({, DeclarationKind.Class, C) + parseMetadataStar({) + listener: beginMetadataStar(var) + listener: endMetadataStar(0) + listener: beginMember() + skipOuterPattern(var) + reportRecoverableErrorWithEnd((, ), PatternVariableDeclarationOutsideFunctionOrMethod) + listener: handleRecoverableError(PatternVariableDeclarationOutsideFunctionOrMethod, (, )) + rewriter() + rewriter() + parseFields({, null, null, null, null, null, null, var, var, Instance of 'NoType', , DeclarationKind.Class, C, true) + listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, var, {) + listener: handleNoType(var) + ensureIdentifierPotentiallyRecovered(var, fieldDeclaration, true) + listener: handleIdentifier(, fieldDeclaration) + parseFieldInitializerOpt(, , null, null, null, null, var, DeclarationKind.Class, C) + listener: beginFieldInitializer(=) + parseExpression(=) + looksLikeOuterPatternEquals(=) + skipOuterPattern(=) + parsePrecedenceExpression(=, 1, true, ConstantPatternContext.none) + parseUnaryExpression(=, true, ConstantPatternContext.none) + parsePrimary(=, expression, ConstantPatternContext.none) + parseParenthesizedExpressionFunctionLiteralOrRecordLiteral(=, ConstantPatternContext.none) + parseParenthesizedExpressionOrRecordLiteral(=, null, ConstantPatternContext.none) + listener: beginParenthesizedExpressionOrRecordLiteral(() + parseExpression(() + looksLikeOuterPatternEquals(() + skipOuterPattern(() + parsePrecedenceExpression((, 1, true, ConstantPatternContext.none) + parseUnaryExpression((, true, ConstantPatternContext.none) + parsePrimary((, expression, ConstantPatternContext.none) + parseLiteralInt(() + listener: handleLiteralInt(0) + parseExpression(,) + looksLikeOuterPatternEquals(,) + skipOuterPattern(,) + parsePrecedenceExpression(,, 1, true, ConstantPatternContext.none) + parseUnaryExpression(,, true, ConstantPatternContext.none) + parsePrimary(,, expression, ConstantPatternContext.none) + parseLiteralInt(,) + listener: handleLiteralInt(1) + ensureCloseParen(1, () + listener: endRecordLiteral((, 2, null) + listener: endFieldInitializer(=, ;) + listener: endClassFields(null, null, null, null, null, null, var, 1, var, ;) + listener: endMember() + notEofOrValue(}, }) + listener: endClassOrMixinOrExtensionBody(DeclarationKind.Class, 1, {, }) + listener: endClassDeclaration(class, }) + listener: endTopLevelDeclaration() + reportAllErrorTokens(class) + listener: endCompilationUnit(1, ) diff --git a/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.parser.expect b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.parser.expect new file mode 100644 index 00000000000..1c3bf558770 --- /dev/null +++ b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.parser.expect @@ -0,0 +1,11 @@ +NOTICE: Stream was rewritten by parser! + +class C { +var *synthetic* = (0, 1); +} + + +class[KeywordToken] C[StringToken] {[BeginToken] +var[KeywordToken] [SyntheticStringToken] =[SimpleToken] ([BeginToken]0[StringToken],[SimpleToken] 1[StringToken])[SimpleToken];[SimpleToken] +}[SimpleToken] +[SimpleToken] diff --git a/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.scanner.expect b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.scanner.expect new file mode 100644 index 00000000000..9e30d47d494 --- /dev/null +++ b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_inClass.dart.scanner.expect @@ -0,0 +1,9 @@ +class C { +var (a, b) = (0, 1); +} + + +class[KeywordToken] C[StringToken] {[BeginToken] +var[KeywordToken] ([BeginToken]a[StringToken],[SimpleToken] b[StringToken])[SimpleToken] =[SimpleToken] ([BeginToken]0[StringToken],[SimpleToken] 1[StringToken])[SimpleToken];[SimpleToken] +}[SimpleToken] +[SimpleToken] diff --git a/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart new file mode 100644 index 00000000000..ca4afcf118d --- /dev/null +++ b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart @@ -0,0 +1 @@ +var (a, b) = (0, 1); diff --git a/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.expect b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.expect new file mode 100644 index 00000000000..0a6de79a182 --- /dev/null +++ b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.expect @@ -0,0 +1,23 @@ +Problems reported: + +parser/patterns/patternVariableDeclaration_topLevel:1:5: A pattern variable declaration may not appear outside a function or method. +var (a, b) = (0, 1); + ^^^^^^ + +beginCompilationUnit(var) + beginMetadataStar(var) + endMetadataStar(0) + beginTopLevelMember(var) + handleRecoverableError(PatternVariableDeclarationOutsideFunctionOrMethod, (, )) + beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ) + handleNoType(var) + handleIdentifier(, topLevelVariableDeclaration) + beginFieldInitializer(=) + beginParenthesizedExpressionOrRecordLiteral(() + handleLiteralInt(0) + handleLiteralInt(1) + endRecordLiteral((, 2, null) + endFieldInitializer(=, ;) + endTopLevelFields(null, null, null, null, var, 1, var, ;) + endTopLevelDeclaration() +endCompilationUnit(1, ) diff --git a/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.intertwined.expect new file mode 100644 index 00000000000..721becb9d25 --- /dev/null +++ b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.intertwined.expect @@ -0,0 +1,54 @@ +parseUnit(var) + skipErrorTokens(var) + listener: beginCompilationUnit(var) + syntheticPreviousToken(var) + parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext') + parseMetadataStar() + listener: beginMetadataStar(var) + listener: endMetadataStar(0) + parseTopLevelMemberImpl() + listener: beginTopLevelMember(var) + skipOuterPattern(var) + reportRecoverableErrorWithEnd((, ), PatternVariableDeclarationOutsideFunctionOrMethod) + listener: handleRecoverableError(PatternVariableDeclarationOutsideFunctionOrMethod, (, )) + rewriter() + rewriter() + parseFields(, null, null, null, null, null, null, var, var, Instance of 'NoType', , DeclarationKind.TopLevel, null, true) + listener: beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, ) + listener: handleNoType(var) + ensureIdentifierPotentiallyRecovered(var, topLevelVariableDeclaration, true) + listener: handleIdentifier(, topLevelVariableDeclaration) + parseFieldInitializerOpt(, , null, null, null, null, var, DeclarationKind.TopLevel, null) + listener: beginFieldInitializer(=) + parseExpression(=) + looksLikeOuterPatternEquals(=) + skipOuterPattern(=) + parsePrecedenceExpression(=, 1, true, ConstantPatternContext.none) + parseUnaryExpression(=, true, ConstantPatternContext.none) + parsePrimary(=, expression, ConstantPatternContext.none) + parseParenthesizedExpressionFunctionLiteralOrRecordLiteral(=, ConstantPatternContext.none) + parseParenthesizedExpressionOrRecordLiteral(=, null, ConstantPatternContext.none) + listener: beginParenthesizedExpressionOrRecordLiteral(() + parseExpression(() + looksLikeOuterPatternEquals(() + skipOuterPattern(() + parsePrecedenceExpression((, 1, true, ConstantPatternContext.none) + parseUnaryExpression((, true, ConstantPatternContext.none) + parsePrimary((, expression, ConstantPatternContext.none) + parseLiteralInt(() + listener: handleLiteralInt(0) + parseExpression(,) + looksLikeOuterPatternEquals(,) + skipOuterPattern(,) + parsePrecedenceExpression(,, 1, true, ConstantPatternContext.none) + parseUnaryExpression(,, true, ConstantPatternContext.none) + parsePrimary(,, expression, ConstantPatternContext.none) + parseLiteralInt(,) + listener: handleLiteralInt(1) + ensureCloseParen(1, () + listener: endRecordLiteral((, 2, null) + listener: endFieldInitializer(=, ;) + listener: endTopLevelFields(null, null, null, null, var, 1, var, ;) + listener: endTopLevelDeclaration() + reportAllErrorTokens(var) + listener: endCompilationUnit(1, ) diff --git a/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.parser.expect b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.parser.expect new file mode 100644 index 00000000000..d1cdda1eb3a --- /dev/null +++ b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.parser.expect @@ -0,0 +1,7 @@ +NOTICE: Stream was rewritten by parser! + +var *synthetic* = (0, 1); + + +var[KeywordToken] [SyntheticStringToken] =[SimpleToken] ([BeginToken]0[StringToken],[SimpleToken] 1[StringToken])[SimpleToken];[SimpleToken] +[SimpleToken] diff --git a/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.scanner.expect b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.scanner.expect new file mode 100644 index 00000000000..16b4d38c75f --- /dev/null +++ b/pkg/front_end/parser_testcases/patterns/patternVariableDeclaration_topLevel.dart.scanner.expect @@ -0,0 +1,5 @@ +var (a, b) = (0, 1); + + +var[KeywordToken] ([BeginToken]a[StringToken],[SimpleToken] b[StringToken])[SimpleToken] =[SimpleToken] ([BeginToken]0[StringToken],[SimpleToken] 1[StringToken])[SimpleToken];[SimpleToken] +[SimpleToken] diff --git a/pkg/front_end/parser_testcases/record/record_type_with_modifiers.dart.intertwined.expect b/pkg/front_end/parser_testcases/record/record_type_with_modifiers.dart.intertwined.expect index 4d73c470986..f28176f1587 100644 --- a/pkg/front_end/parser_testcases/record/record_type_with_modifiers.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/record/record_type_with_modifiers.dart.intertwined.expect @@ -31,6 +31,7 @@ parseUnit(class) listener: beginMetadataStar(final) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) parseFields({, null, null, null, null, null, null, final, final, Instance of 'ComplexTypeInfo', x, DeclarationKind.Class, Foo, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, final, {) parseRecordType((, final, false) @@ -153,6 +154,7 @@ parseUnit(class) listener: beginMetadataStar(static) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) parseFields(;, null, null, null, static, null, null, final, final, Instance of 'ComplexTypeInfo', z, DeclarationKind.Class, Foo, false) listener: beginFields(DeclarationKind.Class, null, null, null, static, null, null, final, ;) parseRecordType((, final, false) @@ -214,6 +216,7 @@ parseUnit(class) listener: beginMetadataStar(static) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(const) parseFields(;, null, null, null, static, null, null, const, const, Instance of 'ComplexTypeInfo', b, DeclarationKind.Class, Foo, false) listener: beginFields(DeclarationKind.Class, null, null, null, static, null, null, const, ;) parseRecordType((, const, false) @@ -314,6 +317,7 @@ parseUnit(class) listener: beginMetadataStar(late) listener: endMetadataStar(0) listener: beginMember() + skipOuterPattern(final) parseFields(;, null, null, null, null, null, late, final, final, Instance of 'ComplexTypeInfo', d, DeclarationKind.Class, Foo, false) listener: beginFields(DeclarationKind.Class, null, null, null, null, null, late, final, ;) parseRecordType((, final, false)