diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/diagnostic.g.dart b/pkg/_fe_analyzer_shared/lib/src/messages/diagnostic.g.dart index a5452dae261..1ddf8384924 100644 --- a/pkg/_fe_analyzer_shared/lib/src/messages/diagnostic.g.dart +++ b/pkg/_fe_analyzer_shared/lib/src/messages/diagnostic.g.dart @@ -167,8 +167,11 @@ const MessageCode baseEnum = const MessageCode( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(String string, String string2), - Message Function({required String string, required String string2}) + Message Function(String actualOperator, String expectedOperator), + Message Function({ + required String actualOperator, + required String expectedOperator, + }) > binaryOperatorWrittenOut = const Template( "BinaryOperatorWrittenOut", @@ -179,25 +182,32 @@ binaryOperatorWrittenOut = const Template( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsBinaryOperatorWrittenOut({ - required String string, - required String string2, + required String actualOperator, + required String expectedOperator, }) { - var string_0 = conversions.validateString(string); - var string2_0 = conversions.validateString(string2); + var actualOperator_0 = conversions.validateString(actualOperator); + var expectedOperator_0 = conversions.validateString(expectedOperator); return new Message( binaryOperatorWrittenOut, problemMessage: - """Binary operator '${string_0}' is written as '${string2_0}' instead of the written out word.""", - correctionMessage: """Try replacing '${string_0}' with '${string2_0}'.""", - arguments: {'string': string, 'string2': string2}, + """Binary operator '${actualOperator_0}' is written as '${expectedOperator_0}' instead of the written out word.""", + correctionMessage: + """Try replacing '${actualOperator_0}' with '${expectedOperator_0}'.""", + arguments: { + 'actualOperator': actualOperator, + 'expectedOperator': expectedOperator, + }, ); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsOldBinaryOperatorWrittenOut( - String string, - String string2, -) => _withArgumentsBinaryOperatorWrittenOut(string: string, string2: string2); + String actualOperator, + String expectedOperator, +) => _withArgumentsBinaryOperatorWrittenOut( + actualOperator: actualOperator, + expectedOperator: expectedOperator, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode breakOutsideOfLoop = const MessageCode( @@ -1629,8 +1639,8 @@ const MessageCode illegalAssignmentToNonAssignable = const MessageCode( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(Token lexeme), - Message Function({required Token lexeme}) + Message Function(Token variableName), + Message Function({required Token variableName}) > illegalPatternAssignmentVariableName = const Template( "IllegalPatternAssignmentVariableName", @@ -1641,26 +1651,29 @@ illegalPatternAssignmentVariableName = const Template( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsIllegalPatternAssignmentVariableName({ - required Token lexeme, + required Token variableName, }) { - var lexeme_0 = conversions.tokenToLexeme(lexeme); + var variableName_0 = conversions.tokenToLexeme(variableName); return new Message( illegalPatternAssignmentVariableName, problemMessage: - """A variable assigned by a pattern assignment can't be named '${lexeme_0}'.""", + """A variable assigned by a pattern assignment can't be named '${variableName_0}'.""", correctionMessage: """Choose a different name.""", - arguments: {'lexeme': lexeme}, + arguments: {'variableName': variableName}, ); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsOldIllegalPatternAssignmentVariableName(Token lexeme) => - _withArgumentsIllegalPatternAssignmentVariableName(lexeme: lexeme); +Message _withArgumentsOldIllegalPatternAssignmentVariableName( + Token variableName, +) => _withArgumentsIllegalPatternAssignmentVariableName( + variableName: variableName, +); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(Token lexeme), - Message Function({required Token lexeme}) + Message Function(Token identifier), + Message Function({required Token identifier}) > illegalPatternIdentifierName = const Template( "IllegalPatternIdentifierName", @@ -1670,25 +1683,27 @@ illegalPatternIdentifierName = const Template( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsIllegalPatternIdentifierName({required Token lexeme}) { - var lexeme_0 = conversions.tokenToLexeme(lexeme); +Message _withArgumentsIllegalPatternIdentifierName({ + required Token identifier, +}) { + var identifier_0 = conversions.tokenToLexeme(identifier); return new Message( illegalPatternIdentifierName, problemMessage: - """A pattern can't refer to an identifier named '${lexeme_0}'.""", + """A pattern can't refer to an identifier named '${identifier_0}'.""", correctionMessage: """Match the identifier using '==""", - arguments: {'lexeme': lexeme}, + arguments: {'identifier': identifier}, ); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsOldIllegalPatternIdentifierName(Token lexeme) => - _withArgumentsIllegalPatternIdentifierName(lexeme: lexeme); +Message _withArgumentsOldIllegalPatternIdentifierName(Token identifier) => + _withArgumentsIllegalPatternIdentifierName(identifier: identifier); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(Token lexeme), - Message Function({required Token lexeme}) + Message Function(Token variableName), + Message Function({required Token variableName}) > illegalPatternVariableName = const Template( "IllegalPatternVariableName", @@ -1698,20 +1713,22 @@ illegalPatternVariableName = const Template( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsIllegalPatternVariableName({required Token lexeme}) { - var lexeme_0 = conversions.tokenToLexeme(lexeme); +Message _withArgumentsIllegalPatternVariableName({ + required Token variableName, +}) { + var variableName_0 = conversions.tokenToLexeme(variableName); return new Message( illegalPatternVariableName, problemMessage: - """The variable declared by a variable pattern can't be named '${lexeme_0}'.""", + """The variable declared by a variable pattern can't be named '${variableName_0}'.""", correctionMessage: """Choose a different name.""", - arguments: {'lexeme': lexeme}, + arguments: {'variableName': variableName}, ); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsOldIllegalPatternVariableName(Token lexeme) => - _withArgumentsIllegalPatternVariableName(lexeme: lexeme); +Message _withArgumentsOldIllegalPatternVariableName(Token variableName) => + _withArgumentsIllegalPatternVariableName(variableName: variableName); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode implementsBeforeExtends = const MessageCode( @@ -1906,8 +1923,8 @@ const MessageCode invalidCodePoint = const MessageCode( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(String name), - Message Function({required String name}) + Message Function(String operatorName), + Message Function({required String operatorName}) > invalidConstantPatternBinary = const Template( "InvalidConstantPatternBinary", @@ -1917,20 +1934,22 @@ invalidConstantPatternBinary = const Template( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidConstantPatternBinary({required String name}) { - var name_0 = conversions.validateAndDemangleName(name); +Message _withArgumentsInvalidConstantPatternBinary({ + required String operatorName, +}) { + var operatorName_0 = conversions.validateAndDemangleName(operatorName); return new Message( invalidConstantPatternBinary, problemMessage: - """The binary operator ${name_0} is not supported as a constant pattern.""", + """The binary operator ${operatorName_0} is not supported as a constant pattern.""", correctionMessage: """Try wrapping the expression in 'const ( ... )'.""", - arguments: {'name': name}, + arguments: {'operatorName': operatorName}, ); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsOldInvalidConstantPatternBinary(String name) => - _withArgumentsInvalidConstantPatternBinary(name: name); +Message _withArgumentsOldInvalidConstantPatternBinary(String operatorName) => + _withArgumentsInvalidConstantPatternBinary(operatorName: operatorName); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode invalidConstantPatternConstPrefix = const MessageCode( @@ -1977,8 +1996,8 @@ const MessageCode invalidConstantPatternNegation = const MessageCode( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(String name), - Message Function({required String name}) + Message Function(String operatorName), + Message Function({required String operatorName}) > invalidConstantPatternUnary = const Template( "InvalidConstantPatternUnary", @@ -1988,20 +2007,22 @@ invalidConstantPatternUnary = const Template( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsInvalidConstantPatternUnary({required String name}) { - var name_0 = conversions.validateAndDemangleName(name); +Message _withArgumentsInvalidConstantPatternUnary({ + required String operatorName, +}) { + var operatorName_0 = conversions.validateAndDemangleName(operatorName); return new Message( invalidConstantPatternUnary, problemMessage: - """The unary operator ${name_0} is not supported as a constant pattern.""", + """The unary operator ${operatorName_0} is not supported as a constant pattern.""", correctionMessage: """Try wrapping the expression in 'const ( ... )'.""", - arguments: {'name': name}, + arguments: {'operatorName': operatorName}, ); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsOldInvalidConstantPatternUnary(String name) => - _withArgumentsInvalidConstantPatternUnary(name: name); +Message _withArgumentsOldInvalidConstantPatternUnary(String operatorName) => + _withArgumentsInvalidConstantPatternUnary(operatorName: operatorName); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode @@ -2164,8 +2185,8 @@ const MessageCode libraryDirectiveNotFirst = const MessageCode( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(String string, Token lexeme), - Message Function({required String string, required Token lexeme}) + Message Function(String kind, Token lexeme), + Message Function({required String kind, required Token lexeme}) > literalWithClass = const Template( "LiteralWithClass", @@ -2176,23 +2197,23 @@ literalWithClass = const Template( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsLiteralWithClass({ - required String string, + required String kind, required Token lexeme, }) { - var string_0 = conversions.validateString(string); + var kind_0 = conversions.validateString(kind); var lexeme_0 = conversions.tokenToLexeme(lexeme); return new Message( literalWithClass, problemMessage: - """A ${string_0} literal can't be prefixed by '${lexeme_0}'.""", + """A ${kind_0} literal can't be prefixed by '${lexeme_0}'.""", correctionMessage: """Try removing '${lexeme_0}'""", - arguments: {'string': string, 'lexeme': lexeme}, + arguments: {'kind': kind, 'lexeme': lexeme}, ); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsOldLiteralWithClass(String string, Token lexeme) => - _withArgumentsLiteralWithClass(string: string, lexeme: lexeme); +Message _withArgumentsOldLiteralWithClass(String kind, Token lexeme) => + _withArgumentsLiteralWithClass(kind: kind, lexeme: lexeme); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< @@ -2727,8 +2748,8 @@ const MessageCode partOfTwice = const MessageCode( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(String name), - Message Function({required String name}) + Message Function(String variableName), + Message Function({required String variableName}) > patternAssignmentDeclaresVariable = const Template( "PatternAssignmentDeclaresVariable", @@ -2739,22 +2760,24 @@ patternAssignmentDeclaresVariable = const Template( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. Message _withArgumentsPatternAssignmentDeclaresVariable({ - required String name, + required String variableName, }) { - var name_0 = conversions.validateAndDemangleName(name); + var variableName_0 = conversions.validateAndDemangleName(variableName); return new Message( patternAssignmentDeclaresVariable, problemMessage: - """Variable '${name_0}' can't be declared in a pattern assignment.""", + """Variable '${variableName_0}' can't be declared in a pattern assignment.""", correctionMessage: """Try using a preexisting variable or changing the assignment to a pattern variable declaration.""", - arguments: {'name': name}, + arguments: {'variableName': variableName}, ); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsOldPatternAssignmentDeclaresVariable(String name) => - _withArgumentsPatternAssignmentDeclaresVariable(name: name); +Message _withArgumentsOldPatternAssignmentDeclaresVariable( + String variableName, +) => + _withArgumentsPatternAssignmentDeclaresVariable(variableName: variableName); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode @@ -2992,8 +3015,8 @@ const MessageCode typeAfterVar = const MessageCode( // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template< - Message Function(String name), - Message Function({required String name}) + Message Function(String typeVariableName), + Message Function({required String typeVariableName}) > typeArgumentsOnTypeVariable = const Template( "TypeArgumentsOnTypeVariable", @@ -3003,20 +3026,26 @@ typeArgumentsOnTypeVariable = const Template( ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsTypeArgumentsOnTypeVariable({required String name}) { - var name_0 = conversions.validateAndDemangleName(name); +Message _withArgumentsTypeArgumentsOnTypeVariable({ + required String typeVariableName, +}) { + var typeVariableName_0 = conversions.validateAndDemangleName( + typeVariableName, + ); return new Message( typeArgumentsOnTypeVariable, problemMessage: - """Can't use type arguments with type variable '${name_0}'.""", + """Can't use type arguments with type variable '${typeVariableName_0}'.""", correctionMessage: """Try removing the type arguments.""", - arguments: {'name': name}, + arguments: {'typeVariableName': typeVariableName}, ); } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsOldTypeArgumentsOnTypeVariable(String name) => - _withArgumentsTypeArgumentsOnTypeVariable(name: name); +Message _withArgumentsOldTypeArgumentsOnTypeVariable(String typeVariableName) => + _withArgumentsTypeArgumentsOnTypeVariable( + typeVariableName: typeVariableName, + ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const MessageCode typeBeforeFactory = const MessageCode( 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 7f342ca01c6..49e953b6a1b 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart @@ -6919,7 +6919,9 @@ class Parser { } else if (tokenLevel <= MULTIPLICATIVE_PRECEDENCE) { reportRecoverableError( next, - diag.invalidConstantPatternBinary.withArgumentsOld(type.lexeme), + diag.invalidConstantPatternBinary.withArguments( + operatorName: type.lexeme, + ), ); } else { // These are prefix or postfix ++/-- and will not be constant @@ -7352,9 +7354,9 @@ class Parser { // Report and redo recovery. reportRecoverableError( token.next!, - diag.binaryOperatorWrittenOut.withArgumentsOld( - token.next!.lexeme, - replacement.lexeme, + diag.binaryOperatorWrittenOut.withArguments( + actualOperator: token.next!.lexeme, + expectedOperator: replacement.lexeme, ), ); rewriter.replaceNextTokenWithSyntheticToken(token, replacement); @@ -7564,7 +7566,7 @@ class Parser { if (constantPatternContext != ConstantPatternContext.none) { reportRecoverableError( operator, - diag.invalidConstantPatternUnary.withArgumentsOld(value!), + diag.invalidConstantPatternUnary.withArguments(operatorName: value!), ); } // Right associative, so we recurse at the same precedence @@ -8754,7 +8756,10 @@ class Parser { // Recover by ignoring the `Map`/`Set` and parse as a literal map/set. reportRecoverableError( next, - diag.literalWithClass.withArgumentsOld(lexeme.toLowerCase(), next), + diag.literalWithClass.withArguments( + kind: lexeme.toLowerCase(), + lexeme: next, + ), ); listener.beginConstLiteral(nextNext); listener.handleNoTypeArguments(nextNext); @@ -8766,7 +8771,10 @@ class Parser { // Recover by ignoring the `Map`/`Set` and parse as a literal map/set. reportRecoverableError( next, - diag.literalWithClass.withArgumentsOld(lexeme.toLowerCase(), next), + diag.literalWithClass.withArguments( + kind: lexeme.toLowerCase(), + lexeme: next, + ), ); listener.beginConstLiteral(nextNext); @@ -8787,7 +8795,10 @@ class Parser { // Recover by ignoring the `List` and parse as a literal list. reportRecoverableError( next, - diag.literalWithClass.withArgumentsOld(lexeme.toLowerCase(), next), + diag.literalWithClass.withArguments( + kind: lexeme.toLowerCase(), + lexeme: next, + ), ); listener.beginConstLiteral(nextNext); listener.handleNoTypeArguments(nextNext); @@ -8799,7 +8810,10 @@ class Parser { // Recover by ignoring the `List` and parse as a literal list. reportRecoverableError( next, - diag.literalWithClass.withArgumentsOld(lexeme.toLowerCase(), next), + diag.literalWithClass.withArguments( + kind: lexeme.toLowerCase(), + lexeme: next, + ), ); listener.beginConstLiteral(nextNext); token = parseLiteralListSetMapOrFunction(next, constKeyword); @@ -9046,9 +9060,9 @@ class Parser { // Recover by ignoring the `Map`/`Set` and parse as a literal map/set. reportRecoverableError( identifier, - diag.literalWithClass.withArgumentsOld( - value.toLowerCase(), - identifier, + diag.literalWithClass.withArguments( + kind: value.toLowerCase(), + lexeme: identifier, ), ); return parsePrimary(identifier, context, ConstantPatternContext.none); @@ -9064,9 +9078,9 @@ class Parser { // require it there. reportRecoverableError( identifier, - diag.literalWithClass.withArgumentsOld( - value.toLowerCase(), - identifier, + diag.literalWithClass.withArguments( + kind: value.toLowerCase(), + lexeme: identifier, ), ); return parsePrimary(identifier, context, ConstantPatternContext.none); @@ -11546,7 +11560,9 @@ class Parser { } else if (illegalPatternIdentifiers.contains(name)) { reportRecoverableError( firstIdentifier, - diag.illegalPatternIdentifierName.withArgumentsOld(firstIdentifier), + diag.illegalPatternIdentifierName.withArguments( + identifier: firstIdentifier, + ), ); } } @@ -11630,8 +11646,8 @@ class Parser { if (!isBareIdentifier) { reportRecoverableError( token, - diag.patternAssignmentDeclaresVariable.withArgumentsOld( - variableName.isEmpty ? '(unnamed)' : variableName, + diag.patternAssignmentDeclaresVariable.withArguments( + variableName: variableName.isEmpty ? '(unnamed)' : variableName, ), ); } @@ -11647,7 +11663,9 @@ class Parser { if (illegalPatternIdentifiers.contains(variableName)) { reportRecoverableError( token, - diag.illegalPatternAssignmentVariableName.withArgumentsOld(token), + diag.illegalPatternAssignmentVariableName.withArguments( + variableName: token, + ), ); } listener.handleAssignedVariablePattern(token); @@ -11655,7 +11673,7 @@ class Parser { if (illegalPatternIdentifiers.contains(variableName)) { reportRecoverableError( token, - diag.illegalPatternVariableName.withArgumentsOld(token), + diag.illegalPatternVariableName.withArguments(variableName: token), ); } if (isBareIdentifier) { diff --git a/pkg/_fe_analyzer_shared/messages.yaml b/pkg/_fe_analyzer_shared/messages.yaml index 7c32e97588c..b36dcaf396f 100644 --- a/pkg/_fe_analyzer_shared/messages.yaml +++ b/pkg/_fe_analyzer_shared/messages.yaml @@ -1247,9 +1247,9 @@ literalWithClassAndNew: literalWithClass: type: syntacticError parameters: - String string: undocumented - Token lexeme: undocumented - problemMessage: "A #string literal can't be prefixed by '#lexeme'." + String kind: The literal kind. + Token lexeme: The lexeme between `new` and the literal. + problemMessage: "A #kind literal can't be prefixed by '#lexeme'." correctionMessage: "Try removing '#lexeme'" analyzerCode: literalWithClass hasPublishedDocs: false @@ -1856,8 +1856,8 @@ topLevelOperator: typeArgumentsOnTypeVariable: type: syntacticError parameters: - Name name: undocumented - problemMessage: "Can't use type arguments with type variable '#name'." + Name typeVariableName: The name of the type variable. + problemMessage: "Can't use type arguments with type variable '#typeVariableName'." correctionMessage: "Try removing the type arguments." analyzerCode: typeArgumentsOnTypeVariable hasPublishedDocs: false @@ -2016,10 +2016,10 @@ colonInPlaceOfIn: binaryOperatorWrittenOut: type: syntacticError parameters: - String string: undocumented - String string2: undocumented - problemMessage: "Binary operator '#string' is written as '#string2' instead of the written out word." - correctionMessage: "Try replacing '#string' with '#string2'." + String actualOperator: The binary operator that was seen. + String expectedOperator: The binary operator that was expected. + problemMessage: "Binary operator '#actualOperator' is written as '#expectedOperator' instead of the written out word." + correctionMessage: "Try replacing '#actualOperator' with '#expectedOperator'." analyzerCode: binaryOperatorWrittenOut hasPublishedDocs: false script: | @@ -2166,8 +2166,8 @@ invalidConstantPatternNegation: invalidConstantPatternUnary: type: syntacticError parameters: - Name name: undocumented - problemMessage: "The unary operator #name is not supported as a constant pattern." + Name operatorName: The name of the unsupported operator. + problemMessage: "The unary operator #operatorName is not supported as a constant pattern." correctionMessage: "Try wrapping the expression in 'const ( ... )'." analyzerCode: invalidConstantPatternUnary hasPublishedDocs: false @@ -2227,8 +2227,8 @@ invalidConstantPatternConstPrefix: invalidConstantPatternBinary: type: syntacticError parameters: - Name name: undocumented - problemMessage: "The binary operator #name is not supported as a constant pattern." + Name operatorName: The name of the unsupported operator. + problemMessage: "The binary operator #operatorName is not supported as a constant pattern." correctionMessage: "Try wrapping the expression in 'const ( ... )'." analyzerCode: invalidConstantPatternBinary hasPublishedDocs: false @@ -2240,8 +2240,8 @@ invalidConstantPatternBinary: patternAssignmentDeclaresVariable: type: syntacticError parameters: - Name name: undocumented - problemMessage: "Variable '#name' can't be declared in a pattern assignment." + Name variableName: The name of the variable that was erroneously declared. + problemMessage: "Variable '#variableName' can't be declared in a pattern assignment." correctionMessage: "Try using a preexisting variable or changing the assignment to a pattern variable declaration." analyzerCode: patternAssignmentDeclaresVariable hasPublishedDocs: false @@ -2296,8 +2296,8 @@ variablePatternKeywordInDeclarationContext: illegalPatternVariableName: type: syntacticError parameters: - Token lexeme: undocumented - problemMessage: The variable declared by a variable pattern can't be named '#lexeme'. + Token variableName: The name that can't be used as a pattern variable name. + problemMessage: The variable declared by a variable pattern can't be named '#variableName'. correctionMessage: Choose a different name. analyzerCode: illegalPatternVariableName hasPublishedDocs: false @@ -2314,8 +2314,8 @@ illegalPatternVariableName: illegalPatternAssignmentVariableName: type: syntacticError parameters: - Token lexeme: undocumented - problemMessage: A variable assigned by a pattern assignment can't be named '#lexeme'. + Token variableName: The name that can't be used as the name of a variable assigned by a pattern assignment. + problemMessage: A variable assigned by a pattern assignment can't be named '#variableName'. correctionMessage: Choose a different name. analyzerCode: illegalPatternAssignmentVariableName hasPublishedDocs: false @@ -2331,9 +2331,9 @@ illegalPatternAssignmentVariableName: illegalPatternIdentifierName: type: syntacticError parameters: - Token lexeme: undocumented - problemMessage: A pattern can't refer to an identifier named '#lexeme'. - correctionMessage: Match the identifier using '== #lexeme'. + Token identifier: The identifier that can't be referred to. + problemMessage: A pattern can't refer to an identifier named '#identifier'. + correctionMessage: Match the identifier using '== #identifier'. analyzerCode: illegalPatternIdentifierName hasPublishedDocs: false comment: |- diff --git a/pkg/analyzer/lib/src/diagnostic/diagnostic.g.dart b/pkg/analyzer/lib/src/diagnostic/diagnostic.g.dart index 2b78e794661..b5c9f2308d2 100644 --- a/pkg/analyzer/lib/src/diagnostic/diagnostic.g.dart +++ b/pkg/analyzer/lib/src/diagnostic/diagnostic.g.dart @@ -1085,12 +1085,12 @@ baseMixinImplementedOutsideOfLibrary = DiagnosticWithArguments( ); /// Parameters: -/// String string: undocumented -/// String string2: undocumented +/// String actualOperator: The binary operator that was seen. +/// String expectedOperator: The binary operator that was expected. const DiagnosticWithArguments< LocatableDiagnostic Function({ - required String string, - required String string2, + required String actualOperator, + required String expectedOperator, }) > binaryOperatorWrittenOut = DiagnosticWithArguments( @@ -6587,7 +6587,8 @@ illegalLanguageVersionOverride = DiagnosticWithArguments( /// 0: the illegal name /// /// Parameters: -/// Token lexeme: undocumented +/// Token variableName: The name that can't be used as the name of a variable +/// assigned by a pattern assignment. const DiagnosticCode illegalPatternAssignmentVariableName = DiagnosticCodeWithExpectedTypes( name: 'illegal_pattern_assignment_variable_name', @@ -6603,7 +6604,7 @@ const DiagnosticCode illegalPatternAssignmentVariableName = /// 0: the illegal name /// /// Parameters: -/// Token lexeme: undocumented +/// Token identifier: The identifier that can't be referred to. const DiagnosticCode illegalPatternIdentifierName = DiagnosticCodeWithExpectedTypes( name: 'illegal_pattern_identifier_name', @@ -6618,7 +6619,8 @@ const DiagnosticCode illegalPatternIdentifierName = /// 0: the illegal name /// /// Parameters: -/// Token lexeme: undocumented +/// Token variableName: The name that can't be used as a pattern variable +/// name. const DiagnosticCode illegalPatternVariableName = DiagnosticCodeWithExpectedTypes( name: 'illegal_pattern_variable_name', @@ -7735,7 +7737,7 @@ invalidConstantConstPrefix = DiagnosticWithoutArgumentsImpl( ); /// Parameters: -/// Name name: undocumented +/// Name operatorName: The name of the unsupported operator. const DiagnosticCode invalidConstantPatternBinary = DiagnosticCodeWithExpectedTypes( name: 'invalid_constant_pattern_binary', @@ -7793,7 +7795,7 @@ invalidConstantPatternNegation = DiagnosticWithoutArgumentsImpl( ); /// Parameters: -/// Name name: undocumented +/// Name operatorName: The name of the unsupported operator. const DiagnosticCode invalidConstantPatternUnary = DiagnosticCodeWithExpectedTypes( name: 'invalid_constant_pattern_unary', @@ -9430,8 +9432,8 @@ listElementTypeNotAssignableNullability = DiagnosticWithArguments( ); /// Parameters: -/// String string: undocumented -/// Token lexeme: undocumented +/// String kind: The literal kind. +/// Token lexeme: The lexeme between `new` and the literal. const DiagnosticCode literalWithClass = DiagnosticCodeWithExpectedTypes( name: 'literal_with_class', problemMessage: "A {0} literal can't be prefixed by '{1}'.", @@ -13007,7 +13009,7 @@ pathPubspecDoesNotExist = DiagnosticWithArguments( ); /// Parameters: -/// Name name: undocumented +/// Name variableName: The name of the variable that was erroneously declared. const DiagnosticCode patternAssignmentDeclaresVariable = DiagnosticCodeWithExpectedTypes( name: 'pattern_assignment_declares_variable', @@ -15227,7 +15229,7 @@ typeArgumentNotMatchingBounds = DiagnosticWithArguments( ); /// Parameters: -/// Name name: undocumented +/// Name typeVariableName: The name of the type variable. const DiagnosticCode typeArgumentsOnTypeVariable = DiagnosticCodeWithExpectedTypes( name: 'type_arguments_on_type_variable', @@ -17935,12 +17937,12 @@ LocatableDiagnostic _withArgumentsBaseMixinImplementedOutsideOfLibrary({ } LocatableDiagnostic _withArgumentsBinaryOperatorWrittenOut({ - required String string, - required String string2, + required String actualOperator, + required String expectedOperator, }) { return LocatableDiagnosticImpl(diag.binaryOperatorWrittenOut, [ - string, - string2, + actualOperator, + expectedOperator, ]); } diff --git a/pkg/front_end/lib/src/builder/named_type_builder.dart b/pkg/front_end/lib/src/builder/named_type_builder.dart index 152499b79a7..7d98605e52a 100644 --- a/pkg/front_end/lib/src/builder/named_type_builder.dart +++ b/pkg/front_end/lib/src/builder/named_type_builder.dart @@ -325,8 +325,8 @@ abstract class NamedTypeBuilderImpl extends NamedTypeBuilder { String nameText = typeName.name; int nameOffset = typeName.nameOffset; int nameLength = typeName.nameLength; - Message message = diag.typeArgumentsOnTypeVariable.withArgumentsOld( - nameText, + Message message = diag.typeArgumentsOnTypeVariable.withArguments( + typeVariableName: nameText, ); problemReporting.addProblem(message, nameOffset, nameLength, fileUri); // TODO(johnniwinther): Should we retain the declaration to support diff --git a/pkg/front_end/lib/src/builder/type_parameter_builder.dart b/pkg/front_end/lib/src/builder/type_parameter_builder.dart index b405ffec27a..42c718014ae 100644 --- a/pkg/front_end/lib/src/builder/type_parameter_builder.dart +++ b/pkg/front_end/lib/src/builder/type_parameter_builder.dart @@ -273,7 +273,7 @@ abstract class NominalParameterBuilder extends TypeParameterBuilder { int charOffset = -1; // TODO(ahe): Provide these. Uri? fileUri = null; // TODO(ahe): Provide these. library.addProblem( - diag.typeArgumentsOnTypeVariable.withArgumentsOld(name), + diag.typeArgumentsOnTypeVariable.withArguments(typeVariableName: name), charOffset, name.length, fileUri, @@ -296,7 +296,7 @@ abstract class NominalParameterBuilder extends TypeParameterBuilder { if (arguments != null) { // Coverage-ignore-block(suite): Not run. library.addProblem( - diag.typeArgumentsOnTypeVariable.withArgumentsOld(name), + diag.typeArgumentsOnTypeVariable.withArguments(typeVariableName: name), charOffset, name.length, fileUri, @@ -555,7 +555,7 @@ abstract class StructuralParameterBuilder extends TypeParameterBuilder { if (arguments != null) { // Coverage-ignore-block(suite): Not run. library.addProblem( - diag.typeArgumentsOnTypeVariable.withArgumentsOld(name), + diag.typeArgumentsOnTypeVariable.withArguments(typeVariableName: name), charOffset, name.length, fileUri, @@ -597,7 +597,7 @@ abstract class StructuralParameterBuilder extends TypeParameterBuilder { int charOffset = -1; // TODO(ahe): Provide these. Uri? fileUri = null; // TODO(ahe): Provide these. library.addProblem( - diag.typeArgumentsOnTypeVariable.withArgumentsOld(name), + diag.typeArgumentsOnTypeVariable.withArguments(typeVariableName: name), charOffset, name.length, fileUri, diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_26810.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_26810.dart.expect index 7be835a7b74..71a702d3313 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_26810.dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_26810.dart.expect @@ -95,7 +95,7 @@ beginCompilationUnit(abstract) handleNoArguments(xor) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -162,7 +162,7 @@ beginCompilationUnit(abstract) handleNoArguments(xor) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -234,7 +234,7 @@ beginCompilationUnit(abstract) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) endBinaryExpression(+, hashCode) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -313,7 +313,7 @@ beginCompilationUnit(abstract) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) endBinaryExpression(+, hashCode) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -405,7 +405,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(xor) handleNoArguments(xor) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleIdentifier(y, expression) handleNoTypeArguments(;) @@ -496,7 +496,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(xor) handleNoArguments(xor) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleIdentifier(y, expression) handleNoTypeArguments(;) @@ -599,7 +599,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(xor) handleNoArguments(xor) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleIdentifier(y, expression) handleNoTypeArguments(;) @@ -719,7 +719,7 @@ beginCompilationUnit(abstract) handleNoArguments(xor) handleSend(x, x) endBinaryExpression(+, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleIdentifier(y, expression) handleNoTypeArguments(+) @@ -822,7 +822,7 @@ beginCompilationUnit(abstract) handleNoArguments(xor) handleSend(x, x) endBinaryExpression(+, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleIdentifier(y, expression) handleNoTypeArguments(+) @@ -926,7 +926,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(xor) handleNoArguments(xor) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleIdentifier(y, expression) handleNoTypeArguments(,) @@ -938,7 +938,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(xor) handleNoArguments(xor) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleIdentifier(y, expression) handleNoTypeArguments()) @@ -1017,7 +1017,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(xor) handleNoArguments(xor) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleIdentifier(y, expression) handleNoTypeArguments(,) @@ -1035,7 +1035,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(xor) handleNoArguments(xor) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleIdentifier(y, expression) handleNoTypeArguments({) @@ -1055,7 +1055,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(xor) handleNoArguments(xor) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) beginBinaryExpression(^) handleIdentifier(y, expression) handleNoTypeArguments(}) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_26810.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_26810.dart.intertwined.expect index a4e14d64432..ad97a9b215a 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_26810.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_26810.dart.intertwined.expect @@ -88,8 +88,8 @@ parseUnit(abstract) parseSend(., expressionContinuation, ConstantPatternContext.none) ensureIdentifier(., expressionContinuation) parseArgumentsOpt(hashCode) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -252,8 +252,8 @@ parseUnit(abstract) parseSend(., expressionContinuation, ConstantPatternContext.none) ensureIdentifier(., expressionContinuation) parseArgumentsOpt(hashCode) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -431,8 +431,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -626,8 +626,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -829,8 +829,8 @@ parseUnit(abstract) parseSend(^, expression, ConstantPatternContext.none) ensureIdentifier(^, expression) parseArgumentsOpt(y) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -1017,8 +1017,8 @@ parseUnit(abstract) parseSend(^, expression, ConstantPatternContext.none) ensureIdentifier(^, expression) parseArgumentsOpt(y) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -1227,8 +1227,8 @@ parseUnit(abstract) parseSend(^, expression, ConstantPatternContext.none) ensureIdentifier(^, expression) parseArgumentsOpt(y) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -1491,8 +1491,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -1710,8 +1710,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -1945,8 +1945,8 @@ parseUnit(abstract) parseSend(^, expression, ConstantPatternContext.none) ensureIdentifier(^, expression) parseArgumentsOpt(y) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -1986,8 +1986,8 @@ parseUnit(abstract) parseSend(^, expression, ConstantPatternContext.none) ensureIdentifier(^, expression) parseArgumentsOpt(y) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -2182,8 +2182,8 @@ parseUnit(abstract) parseSend(^, expression, ConstantPatternContext.none) ensureIdentifier(^, expression) parseArgumentsOpt(y) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -2237,8 +2237,8 @@ parseUnit(abstract) parseSend(^, expression, ConstantPatternContext.none) ensureIdentifier(^, expression) parseArgumentsOpt(y) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) @@ -2318,8 +2318,8 @@ parseUnit(abstract) parseSend(^, expression, ConstantPatternContext.none) ensureIdentifier(^, expression) parseArgumentsOpt(y) - reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {string: xor, string2: ^}], xor, xor) + reportRecoverableError(xor, Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'xor' is written as '^' instead of the written out word., Try replacing 'xor' with '^'., {actualOperator: xor, expectedOperator: ^}], xor, xor) rewriter() listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, true, ConstantPatternContext.none) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_26810_and.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_26810_and.dart.expect index 4c8000165b1..a5996a9d26d 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_26810_and.dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_26810_and.dart.expect @@ -95,7 +95,7 @@ beginCompilationUnit(abstract) handleNoArguments(and) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -162,7 +162,7 @@ beginCompilationUnit(abstract) handleNoArguments(and) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -234,7 +234,7 @@ beginCompilationUnit(abstract) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) endBinaryExpression(+, hashCode) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -313,7 +313,7 @@ beginCompilationUnit(abstract) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) endBinaryExpression(+, hashCode) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -405,7 +405,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(and) handleNoArguments(and) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleIdentifier(y, expression) handleNoTypeArguments(;) @@ -496,7 +496,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(and) handleNoArguments(and) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleIdentifier(y, expression) handleNoTypeArguments(;) @@ -599,7 +599,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(and) handleNoArguments(and) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleIdentifier(y, expression) handleNoTypeArguments(;) @@ -719,7 +719,7 @@ beginCompilationUnit(abstract) handleNoArguments(and) handleSend(x, x) endBinaryExpression(+, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleIdentifier(y, expression) handleNoTypeArguments(+) @@ -822,7 +822,7 @@ beginCompilationUnit(abstract) handleNoArguments(and) handleSend(x, x) endBinaryExpression(+, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleIdentifier(y, expression) handleNoTypeArguments(+) @@ -926,7 +926,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(and) handleNoArguments(and) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleIdentifier(y, expression) handleNoTypeArguments(,) @@ -938,7 +938,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(and) handleNoArguments(and) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleIdentifier(y, expression) handleNoTypeArguments()) @@ -1017,7 +1017,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(and) handleNoArguments(and) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleIdentifier(y, expression) handleNoTypeArguments(,) @@ -1035,7 +1035,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(and) handleNoArguments(and) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleIdentifier(y, expression) handleNoTypeArguments({) @@ -1055,7 +1055,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(and) handleNoArguments(and) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) beginBinaryExpression(&) handleIdentifier(y, expression) handleNoTypeArguments(}) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_26810_and.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_26810_and.dart.intertwined.expect index 0342976c8dc..79349d3962c 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_26810_and.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_26810_and.dart.intertwined.expect @@ -88,8 +88,8 @@ parseUnit(abstract) parseSend(., expressionContinuation, ConstantPatternContext.none) ensureIdentifier(., expressionContinuation) parseArgumentsOpt(hashCode) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -252,8 +252,8 @@ parseUnit(abstract) parseSend(., expressionContinuation, ConstantPatternContext.none) ensureIdentifier(., expressionContinuation) parseArgumentsOpt(hashCode) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -432,8 +432,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -628,8 +628,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -831,8 +831,8 @@ parseUnit(abstract) parseSend(&, expression, ConstantPatternContext.none) ensureIdentifier(&, expression) parseArgumentsOpt(y) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -1019,8 +1019,8 @@ parseUnit(abstract) parseSend(&, expression, ConstantPatternContext.none) ensureIdentifier(&, expression) parseArgumentsOpt(y) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -1229,8 +1229,8 @@ parseUnit(abstract) parseSend(&, expression, ConstantPatternContext.none) ensureIdentifier(&, expression) parseArgumentsOpt(y) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -1494,8 +1494,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -1714,8 +1714,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -1949,8 +1949,8 @@ parseUnit(abstract) parseSend(&, expression, ConstantPatternContext.none) ensureIdentifier(&, expression) parseArgumentsOpt(y) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -1990,8 +1990,8 @@ parseUnit(abstract) parseSend(&, expression, ConstantPatternContext.none) ensureIdentifier(&, expression) parseArgumentsOpt(y) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -2186,8 +2186,8 @@ parseUnit(abstract) parseSend(&, expression, ConstantPatternContext.none) ensureIdentifier(&, expression) parseArgumentsOpt(y) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -2241,8 +2241,8 @@ parseUnit(abstract) parseSend(&, expression, ConstantPatternContext.none) ensureIdentifier(&, expression) parseArgumentsOpt(y) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) @@ -2322,8 +2322,8 @@ parseUnit(abstract) parseSend(&, expression, ConstantPatternContext.none) ensureIdentifier(&, expression) parseArgumentsOpt(y) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {string: and, string2: &}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&' instead of the written out word., Try replacing 'and' with '&'., {actualOperator: and, expectedOperator: &}], and, and) rewriter() listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, true, ConstantPatternContext.none) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_26810_or.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_26810_or.dart.expect index 7b299f9de3e..f1208a6469c 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_26810_or.dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_26810_or.dart.expect @@ -95,7 +95,7 @@ beginCompilationUnit(abstract) handleNoArguments(or) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -162,7 +162,7 @@ beginCompilationUnit(abstract) handleNoArguments(or) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -234,7 +234,7 @@ beginCompilationUnit(abstract) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) endBinaryExpression(+, hashCode) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -313,7 +313,7 @@ beginCompilationUnit(abstract) handleSend(hashCode, hashCode) handleDotAccess(., hashCode, false) endBinaryExpression(+, hashCode) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleLiteralNull(null) handleIdentifier(hashCode, expressionContinuation) @@ -405,7 +405,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(or) handleNoArguments(or) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleIdentifier(y, expression) handleNoTypeArguments(;) @@ -496,7 +496,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(or) handleNoArguments(or) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleIdentifier(y, expression) handleNoTypeArguments(;) @@ -599,7 +599,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(or) handleNoArguments(or) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleIdentifier(y, expression) handleNoTypeArguments(;) @@ -719,7 +719,7 @@ beginCompilationUnit(abstract) handleNoArguments(or) handleSend(x, x) endBinaryExpression(+, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleIdentifier(y, expression) handleNoTypeArguments(+) @@ -822,7 +822,7 @@ beginCompilationUnit(abstract) handleNoArguments(or) handleSend(x, x) endBinaryExpression(+, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleIdentifier(y, expression) handleNoTypeArguments(+) @@ -926,7 +926,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(or) handleNoArguments(or) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleIdentifier(y, expression) handleNoTypeArguments(,) @@ -938,7 +938,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(or) handleNoArguments(or) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleIdentifier(y, expression) handleNoTypeArguments()) @@ -1017,7 +1017,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(or) handleNoArguments(or) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleIdentifier(y, expression) handleNoTypeArguments(,) @@ -1035,7 +1035,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(or) handleNoArguments(or) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleIdentifier(y, expression) handleNoTypeArguments({) @@ -1055,7 +1055,7 @@ beginCompilationUnit(abstract) handleNoTypeArguments(or) handleNoArguments(or) handleSend(x, x) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) beginBinaryExpression(|) handleIdentifier(y, expression) handleNoTypeArguments(}) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_26810_or.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_26810_or.dart.intertwined.expect index 31fc799846d..f340b7a5171 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_26810_or.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_26810_or.dart.intertwined.expect @@ -88,8 +88,8 @@ parseUnit(abstract) parseSend(., expressionContinuation, ConstantPatternContext.none) ensureIdentifier(., expressionContinuation) parseArgumentsOpt(hashCode) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -252,8 +252,8 @@ parseUnit(abstract) parseSend(., expressionContinuation, ConstantPatternContext.none) ensureIdentifier(., expressionContinuation) parseArgumentsOpt(hashCode) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -432,8 +432,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -628,8 +628,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -831,8 +831,8 @@ parseUnit(abstract) parseSend(|, expression, ConstantPatternContext.none) ensureIdentifier(|, expression) parseArgumentsOpt(y) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -1019,8 +1019,8 @@ parseUnit(abstract) parseSend(|, expression, ConstantPatternContext.none) ensureIdentifier(|, expression) parseArgumentsOpt(y) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -1229,8 +1229,8 @@ parseUnit(abstract) parseSend(|, expression, ConstantPatternContext.none) ensureIdentifier(|, expression) parseArgumentsOpt(y) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -1494,8 +1494,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -1714,8 +1714,8 @@ parseUnit(abstract) parseUnaryExpression(+, true, ConstantPatternContext.none) parsePrimary(+, expression, ConstantPatternContext.none) parseLiteralInt(+) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -1949,8 +1949,8 @@ parseUnit(abstract) parseSend(|, expression, ConstantPatternContext.none) ensureIdentifier(|, expression) parseArgumentsOpt(y) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -1990,8 +1990,8 @@ parseUnit(abstract) parseSend(|, expression, ConstantPatternContext.none) ensureIdentifier(|, expression) parseArgumentsOpt(y) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -2186,8 +2186,8 @@ parseUnit(abstract) parseSend(|, expression, ConstantPatternContext.none) ensureIdentifier(|, expression) parseArgumentsOpt(y) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -2241,8 +2241,8 @@ parseUnit(abstract) parseSend(|, expression, ConstantPatternContext.none) ensureIdentifier(|, expression) parseArgumentsOpt(y) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) @@ -2322,8 +2322,8 @@ parseUnit(abstract) parseSend(|, expression, ConstantPatternContext.none) ensureIdentifier(|, expression) parseArgumentsOpt(y) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {string: or, string2: |}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '|' instead of the written out word., Try replacing 'or' with '|'., {actualOperator: or, expectedOperator: |}], or, or) rewriter() listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, true, ConstantPatternContext.none) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_44785.crash_dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_44785.crash_dart.expect index c4d72d5d4c4..7c6c8e07a8d 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_44785.crash_dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_44785.crash_dart.expect @@ -54,7 +54,7 @@ beginCompilationUnit(foo) beginBinaryExpression(==) handleLiteralNull(null) endBinaryExpression(==, null) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}], or, or) beginBinaryExpression(||) handleIdentifier(b, expression) handleNoTypeArguments(==) @@ -114,7 +114,7 @@ beginCompilationUnit(foo) beginBinaryExpression(==) handleLiteralNull(null) endBinaryExpression(==, null) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}], and, and) beginBinaryExpression(&&) handleIdentifier(b, expression) handleNoTypeArguments(==) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_44785.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_44785.crash_dart.intertwined.expect index b347fc96aa2..9083d408eb6 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_44785.crash_dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_44785.crash_dart.intertwined.expect @@ -100,8 +100,8 @@ parseUnit(foo) parseUnaryExpression(==, true, ConstantPatternContext.none) parsePrimary(==, expression, ConstantPatternContext.none) parseLiteralNull(==) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}], or, or) rewriter() listener: beginBinaryExpression(||) parsePrecedenceExpression(||, 6, true, ConstantPatternContext.none) @@ -256,8 +256,8 @@ parseUnit(foo) parseUnaryExpression(==, true, ConstantPatternContext.none) parsePrimary(==, expression, ConstantPatternContext.none) parseLiteralNull(==) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}], and, and) rewriter() listener: beginBinaryExpression(&&) parsePrecedenceExpression(&&, 7, true, ConstantPatternContext.none) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_44785_prime_1.crash_dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_44785_prime_1.crash_dart.expect index 2803ce0b5a8..8650d318816 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_44785_prime_1.crash_dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_44785_prime_1.crash_dart.expect @@ -62,7 +62,7 @@ beginCompilationUnit(foo) beginBinaryExpression(==) handleLiteralNull(null) endBinaryExpression(==, null) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}], or, or) beginBinaryExpression(||) handleIdentifier(b, expression) handleNoTypeArguments(==) @@ -130,7 +130,7 @@ beginCompilationUnit(foo) beginBinaryExpression(==) handleLiteralNull(null) endBinaryExpression(==, null) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}], or, or) beginBinaryExpression(||) handleIdentifier(b, expression) handleNoTypeArguments(==) @@ -140,7 +140,7 @@ beginCompilationUnit(foo) handleLiteralNull(null) endBinaryExpression(==, null) endBinaryExpression(||, null) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}], or, or) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}], or, or) beginBinaryExpression(||) handleIdentifier(c, expression) handleNoTypeArguments(==) @@ -199,7 +199,7 @@ beginCompilationUnit(foo) beginBinaryExpression(==) handleLiteralNull(null) endBinaryExpression(==, null) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}], and, and) beginBinaryExpression(&&) handleIdentifier(b, expression) handleNoTypeArguments(==) @@ -267,7 +267,7 @@ beginCompilationUnit(foo) beginBinaryExpression(==) handleLiteralNull(null) endBinaryExpression(==, null) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}], and, and) beginBinaryExpression(&&) handleIdentifier(b, expression) handleNoTypeArguments(==) @@ -277,7 +277,7 @@ beginCompilationUnit(foo) handleLiteralNull(null) endBinaryExpression(==, null) endBinaryExpression(&&, null) - handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}], and, and) + handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}], and, and) beginBinaryExpression(&&) handleIdentifier(c, expression) handleNoTypeArguments(==) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_44785_prime_1.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_44785_prime_1.crash_dart.intertwined.expect index 388884c45f3..fe49eaee56b 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_44785_prime_1.crash_dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_44785_prime_1.crash_dart.intertwined.expect @@ -100,8 +100,8 @@ parseUnit(foo) parseUnaryExpression(==, true, ConstantPatternContext.none) parsePrimary(==, expression, ConstantPatternContext.none) parseLiteralNull(==) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}], or, or) rewriter() listener: beginBinaryExpression(||) parsePrecedenceExpression(||, 6, true, ConstantPatternContext.none) @@ -265,8 +265,8 @@ parseUnit(foo) parseUnaryExpression(==, true, ConstantPatternContext.none) parsePrimary(==, expression, ConstantPatternContext.none) parseLiteralNull(==) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}], or, or) rewriter() listener: beginBinaryExpression(||) parsePrecedenceExpression(||, 6, true, ConstantPatternContext.none) @@ -310,8 +310,8 @@ parseUnit(foo) parseUnaryExpression(==, true, ConstantPatternContext.none) parsePrimary(==, expression, ConstantPatternContext.none) parseLiteralNull(==) - reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {string: or, string2: ||}], or, or) + reportRecoverableError(or, Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'or' is written as '||' instead of the written out word., Try replacing 'or' with '||'., {actualOperator: or, expectedOperator: ||}], or, or) rewriter() listener: beginBinaryExpression(||) parsePrecedenceExpression(||, 6, true, ConstantPatternContext.none) @@ -463,8 +463,8 @@ parseUnit(foo) parseUnaryExpression(==, true, ConstantPatternContext.none) parsePrimary(==, expression, ConstantPatternContext.none) parseLiteralNull(==) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}], and, and) rewriter() listener: beginBinaryExpression(&&) parsePrecedenceExpression(&&, 7, true, ConstantPatternContext.none) @@ -628,8 +628,8 @@ parseUnit(foo) parseUnaryExpression(==, true, ConstantPatternContext.none) parsePrimary(==, expression, ConstantPatternContext.none) parseLiteralNull(==) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}], and, and) rewriter() listener: beginBinaryExpression(&&) parsePrecedenceExpression(&&, 7, true, ConstantPatternContext.none) @@ -673,8 +673,8 @@ parseUnit(foo) parseUnaryExpression(==, true, ConstantPatternContext.none) parsePrimary(==, expression, ConstantPatternContext.none) parseLiteralNull(==) - reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}]) - listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {string: and, string2: &&}], and, and) + reportRecoverableError(and, Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}]) + listener: handleRecoverableError(Message[Template(BinaryOperatorWrittenOut), Binary operator 'and' is written as '&&' instead of the written out word., Try replacing 'and' with '&&'., {actualOperator: and, expectedOperator: &&}], and, and) rewriter() listener: beginBinaryExpression(&&) parsePrecedenceExpression(&&, 7, true, ConstantPatternContext.none) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251.dart.expect index dd90ccabb9d..3696470162e 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251.dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251.dart.expect @@ -46,7 +46,7 @@ beginCompilationUnit(class) handleType(Map, null) handleIdentifier(foo1, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) beginTypeArguments(<) handleIdentifier(String, typeReference) handleNoTypeArguments(,) @@ -111,7 +111,7 @@ beginCompilationUnit(class) handleType(Map, null) handleIdentifier(foo3, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) handleNoTypeArguments({) handleLiteralSetOrMap(0, {, null, }, false) endFieldInitializer(=, }) @@ -192,7 +192,7 @@ beginCompilationUnit(class) handleType(Map, null) handleIdentifier(foo6, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) beginTypeArguments(<) handleIdentifier(String, typeReference) handleNoTypeArguments(,) @@ -229,7 +229,7 @@ beginCompilationUnit(class) handleType(Map, null) handleIdentifier(foo7, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) handleNoTypeArguments({) beginLiteralString("a") endLiteralString(0, :) 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 9c2936c28d4..7ac4c012483 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 @@ -61,8 +61,8 @@ parseUnit(class) parsePrimary(=, expression, ConstantPatternContext.none) parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none) parseSend(=, expression, ConstantPatternContext.none) - reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) parsePrimary(Map, expression, ConstantPatternContext.none) parseLiteralListSetMapOrFunction(Map, null) listener: beginTypeArguments(<) @@ -165,8 +165,8 @@ parseUnit(class) parsePrimary(=, expression, ConstantPatternContext.none) parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none) parseSend(=, expression, ConstantPatternContext.none) - reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) parsePrimary(Map, expression, ConstantPatternContext.none) listener: handleNoTypeArguments({) parseLiteralSetOrMapSuffix(Map, null) @@ -313,8 +313,8 @@ parseUnit(class) parsePrimary(=, expression, ConstantPatternContext.none) parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none) parseSend(=, expression, ConstantPatternContext.none) - reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) parsePrimary(Map, expression, ConstantPatternContext.none) parseLiteralListSetMapOrFunction(Map, null) listener: beginTypeArguments(<) @@ -387,8 +387,8 @@ parseUnit(class) parsePrimary(=, expression, ConstantPatternContext.none) parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none) parseSend(=, expression, ConstantPatternContext.none) - reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) parsePrimary(Map, expression, ConstantPatternContext.none) listener: handleNoTypeArguments({) parseLiteralSetOrMapSuffix(Map, null) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_const.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_const.dart.expect index 48b8d509e00..1a6b0cee5b3 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_const.dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_const.dart.expect @@ -46,7 +46,7 @@ beginCompilationUnit(class) handleType(Map, null) handleIdentifier(foo1, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) beginConstLiteral(<) beginTypeArguments(<) handleIdentifier(String, typeReference) @@ -115,7 +115,7 @@ beginCompilationUnit(class) handleType(Map, null) handleIdentifier(foo3, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) beginConstLiteral({) handleNoTypeArguments({) handleLiteralSetOrMap(0, {, const, }, false) @@ -206,7 +206,7 @@ beginCompilationUnit(class) handleType(Map, null) handleIdentifier(foo6, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) beginConstLiteral(<) beginTypeArguments(<) handleIdentifier(String, typeReference) @@ -245,7 +245,7 @@ beginCompilationUnit(class) handleType(Map, null) handleIdentifier(foo7, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) beginConstLiteral({) handleNoTypeArguments({) beginLiteralString("a") 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 761ed8a506a..a48d5c08762 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 @@ -59,8 +59,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) listener: beginConstLiteral(<) parseLiteralListSetMapOrFunction(Map, const) listener: beginTypeArguments(<) @@ -165,8 +165,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) listener: beginConstLiteral({) listener: handleNoTypeArguments({) parseLiteralSetOrMapSuffix(Map, const) @@ -316,8 +316,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) listener: beginConstLiteral(<) parseLiteralListSetMapOrFunction(Map, const) listener: beginTypeArguments(<) @@ -389,8 +389,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {string: map, lexeme: Map}], Map, Map) + reportRecoverableError(Map, Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A map literal can't be prefixed by 'Map'., Try removing 'Map', {kind: map, lexeme: Map}], Map, Map) listener: beginConstLiteral({) listener: handleNoTypeArguments({) parseLiteralSetOrMapSuffix(Map, const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_list.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_list.dart.expect index fd677a77726..3d30724f9bf 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_list.dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_list.dart.expect @@ -39,7 +39,7 @@ beginCompilationUnit(class) handleType(List, null) handleIdentifier(foo1, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) beginTypeArguments(<) handleIdentifier(List, typeReference) beginTypeArguments(<) @@ -92,7 +92,7 @@ beginCompilationUnit(class) handleType(List, null) handleIdentifier(foo3, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) handleNoTypeArguments([]) handleLiteralList(0, [, null, ]) endFieldInitializer(=, ]) @@ -161,7 +161,7 @@ beginCompilationUnit(class) handleType(List, null) handleIdentifier(foo6, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) beginTypeArguments(<) handleIdentifier(List, typeReference) beginTypeArguments(<) 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 65b3120b0a8..cef35fc0e9f 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 @@ -57,8 +57,8 @@ parseUnit(class) parsePrimary(=, expression, ConstantPatternContext.none) parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none) parseSend(=, expression, ConstantPatternContext.none) - reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) parsePrimary(List, expression, ConstantPatternContext.none) parseLiteralListSetMapOrFunction(List, null) listener: beginTypeArguments(<) @@ -153,8 +153,8 @@ parseUnit(class) parsePrimary(=, expression, ConstantPatternContext.none) parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none) parseSend(=, expression, ConstantPatternContext.none) - reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) parsePrimary(List, expression, ConstantPatternContext.none) listener: handleNoTypeArguments([]) parseLiteralListSuffix(List, null) @@ -289,8 +289,8 @@ parseUnit(class) parsePrimary(=, expression, ConstantPatternContext.none) parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none) parseSend(=, expression, ConstantPatternContext.none) - reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) parsePrimary(List, expression, ConstantPatternContext.none) parseLiteralListSetMapOrFunction(List, null) listener: beginTypeArguments(<) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_const.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_const.dart.expect index fdbb1f9a032..816b24188fc 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_const.dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_list_const.dart.expect @@ -43,7 +43,7 @@ beginCompilationUnit(class) handleType(List, null) handleIdentifier(foo1, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) beginConstLiteral(<) beginTypeArguments(<) handleIdentifier(List, typeReference) @@ -100,7 +100,7 @@ beginCompilationUnit(class) handleType(List, null) handleIdentifier(foo3, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) beginConstLiteral([]) handleNoTypeArguments([]) handleLiteralList(0, [, const, ]) @@ -179,7 +179,7 @@ beginCompilationUnit(class) handleType(List, null) handleIdentifier(foo6, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) beginConstLiteral(<) beginTypeArguments(<) handleIdentifier(List, typeReference) @@ -209,7 +209,7 @@ beginCompilationUnit(class) handleType(List, null) handleIdentifier(foo7, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) beginConstLiteral([) handleNoTypeArguments([) handleLiteralNull(null) 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 1e4391a1db4..44f5857655f 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 @@ -55,8 +55,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) listener: beginConstLiteral(<) parseLiteralListSetMapOrFunction(List, const) listener: beginTypeArguments(<) @@ -153,8 +153,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) listener: beginConstLiteral([]) listener: handleNoTypeArguments([]) parseLiteralListSuffix(List, const) @@ -292,8 +292,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) listener: beginConstLiteral(<) parseLiteralListSetMapOrFunction(List, const) listener: beginTypeArguments(<) @@ -347,8 +347,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {string: list, lexeme: List}], List, List) + reportRecoverableError(List, Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A list literal can't be prefixed by 'List'., Try removing 'List', {kind: list, lexeme: List}], List, List) listener: beginConstLiteral([) listener: handleNoTypeArguments([) parseLiteralListSuffix(List, const) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_set.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_set.dart.expect index a5c6aa90497..a50456027fc 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_set.dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_set.dart.expect @@ -43,7 +43,7 @@ beginCompilationUnit(class) handleType(Set, null) handleIdentifier(foo1, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) beginTypeArguments(<) handleIdentifier(List, typeReference) beginTypeArguments(<) @@ -96,7 +96,7 @@ beginCompilationUnit(class) handleType(Set, null) handleIdentifier(foo3, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) handleNoTypeArguments({) handleLiteralSetOrMap(0, {, null, }, false) endFieldInitializer(=, }) @@ -165,7 +165,7 @@ beginCompilationUnit(class) handleType(Set, null) handleIdentifier(foo6, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) beginTypeArguments(<) handleIdentifier(List, typeReference) beginTypeArguments(<) @@ -193,7 +193,7 @@ beginCompilationUnit(class) handleType(Set, null) handleIdentifier(foo7, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) handleNoTypeArguments({) handleLiteralNull(null) handleLiteralSetOrMap(1, {, null, }, true) 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 de5a448a709..5a29fcda956 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 @@ -57,8 +57,8 @@ parseUnit(class) parsePrimary(=, expression, ConstantPatternContext.none) parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none) parseSend(=, expression, ConstantPatternContext.none) - reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) parsePrimary(Set, expression, ConstantPatternContext.none) parseLiteralListSetMapOrFunction(Set, null) listener: beginTypeArguments(<) @@ -147,8 +147,8 @@ parseUnit(class) parsePrimary(=, expression, ConstantPatternContext.none) parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none) parseSend(=, expression, ConstantPatternContext.none) - reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) parsePrimary(Set, expression, ConstantPatternContext.none) listener: handleNoTypeArguments({) parseLiteralSetOrMapSuffix(Set, null) @@ -280,8 +280,8 @@ parseUnit(class) parsePrimary(=, expression, ConstantPatternContext.none) parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none) parseSend(=, expression, ConstantPatternContext.none) - reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) parsePrimary(Set, expression, ConstantPatternContext.none) parseLiteralListSetMapOrFunction(Set, null) listener: beginTypeArguments(<) @@ -336,8 +336,8 @@ parseUnit(class) parsePrimary(=, expression, ConstantPatternContext.none) parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none) parseSend(=, expression, ConstantPatternContext.none) - reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) parsePrimary(Set, expression, ConstantPatternContext.none) listener: handleNoTypeArguments({) parseLiteralSetOrMapSuffix(Set, null) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_const.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_const.dart.expect index 37358c5f1f0..ec8e1c3b707 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_const.dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_45251_set_const.dart.expect @@ -43,7 +43,7 @@ beginCompilationUnit(class) handleType(Set, null) handleIdentifier(foo1, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) beginConstLiteral(<) beginTypeArguments(<) handleIdentifier(List, typeReference) @@ -100,7 +100,7 @@ beginCompilationUnit(class) handleType(Set, null) handleIdentifier(foo3, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) beginConstLiteral({) handleNoTypeArguments({) handleLiteralSetOrMap(0, {, const, }, false) @@ -179,7 +179,7 @@ beginCompilationUnit(class) handleType(Set, null) handleIdentifier(foo6, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) beginConstLiteral(<) beginTypeArguments(<) handleIdentifier(List, typeReference) @@ -209,7 +209,7 @@ beginCompilationUnit(class) handleType(Set, null) handleIdentifier(foo7, fieldDeclaration) beginFieldInitializer(=) - handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) beginConstLiteral({) handleNoTypeArguments({) handleLiteralNull(null) 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 674561d78ab..aebe3b861ff 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 @@ -55,8 +55,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) listener: beginConstLiteral(<) parseLiteralListSetMapOrFunction(Set, const) listener: beginTypeArguments(<) @@ -147,8 +147,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) listener: beginConstLiteral({) listener: handleNoTypeArguments({) parseLiteralSetOrMapSuffix(Set, const) @@ -283,8 +283,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) listener: beginConstLiteral(<) parseLiteralListSetMapOrFunction(Set, const) listener: beginTypeArguments(<) @@ -338,8 +338,8 @@ parseUnit(class) parseUnaryExpression(=, true, ConstantPatternContext.none) parsePrimary(=, expression, ConstantPatternContext.none) parseConstExpression(=) - reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}]) - listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {string: set, lexeme: Set}], Set, Set) + reportRecoverableError(Set, Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}]) + listener: handleRecoverableError(Message[Template(LiteralWithClass), A set literal can't be prefixed by 'Set'., Try removing 'Set', {kind: set, lexeme: Set}], Set, Set) listener: beginConstLiteral({) listener: handleNoTypeArguments({) parseLiteralSetOrMapSuffix(Set, const) diff --git a/pkg/front_end/parser_testcases/patterns/assignedVariable_namedAs.dart.expect b/pkg/front_end/parser_testcases/patterns/assignedVariable_namedAs.dart.expect index 3594c1d5247..58ed5019541 100644 --- a/pkg/front_end/parser_testcases/patterns/assignedVariable_namedAs.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/assignedVariable_namedAs.dart.expect @@ -36,7 +36,7 @@ beginCompilationUnit(void) endVariablesDeclaration(1, ;) beginPattern(;) beginPattern(() - handleRecoverableError(Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'as'., Choose a different name., {lexeme: as}], as, as) + handleRecoverableError(Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'as'., Choose a different name., {variableName: as}], as, as) handleAssignedVariablePattern(as) endPattern(as) handleParenthesizedPattern(() diff --git a/pkg/front_end/parser_testcases/patterns/assignedVariable_namedAs.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/assignedVariable_namedAs.dart.intertwined.expect index e370f10c801..b1293a3a1b5 100644 --- a/pkg/front_end/parser_testcases/patterns/assignedVariable_namedAs.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/assignedVariable_namedAs.dart.intertwined.expect @@ -77,8 +77,8 @@ parseUnit(void) listener: beginPattern(() parsePrimaryPattern((, PatternContext.assignment) parseVariablePattern((, PatternContext.assignment, typeInfo: NoType()) - reportRecoverableError(as, Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'as'., Choose a different name., {lexeme: as}]) - listener: handleRecoverableError(Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'as'., Choose a different name., {lexeme: as}], as, as) + reportRecoverableError(as, Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'as'., Choose a different name., {variableName: as}]) + listener: handleRecoverableError(Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'as'., Choose a different name., {variableName: as}], as, as) listener: handleAssignedVariablePattern(as) listener: endPattern(as) ensureCloseParen(as, () diff --git a/pkg/front_end/parser_testcases/patterns/assignedVariable_namedWhen.dart.expect b/pkg/front_end/parser_testcases/patterns/assignedVariable_namedWhen.dart.expect index 07fb6047454..1df3e2f0182 100644 --- a/pkg/front_end/parser_testcases/patterns/assignedVariable_namedWhen.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/assignedVariable_namedWhen.dart.expect @@ -36,7 +36,7 @@ beginCompilationUnit(void) endVariablesDeclaration(1, ;) beginPattern(;) beginPattern(() - handleRecoverableError(Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'when'., Choose a different name., {lexeme: when}], when, when) + handleRecoverableError(Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'when'., Choose a different name., {variableName: when}], when, when) handleAssignedVariablePattern(when) endPattern(when) handleParenthesizedPattern(() diff --git a/pkg/front_end/parser_testcases/patterns/assignedVariable_namedWhen.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/assignedVariable_namedWhen.dart.intertwined.expect index 965e4e0f29c..02b727fb496 100644 --- a/pkg/front_end/parser_testcases/patterns/assignedVariable_namedWhen.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/assignedVariable_namedWhen.dart.intertwined.expect @@ -77,8 +77,8 @@ parseUnit(void) listener: beginPattern(() parsePrimaryPattern((, PatternContext.assignment) parseVariablePattern((, PatternContext.assignment, typeInfo: NoType()) - reportRecoverableError(when, Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'when'., Choose a different name., {lexeme: when}]) - listener: handleRecoverableError(Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'when'., Choose a different name., {lexeme: when}], when, when) + reportRecoverableError(when, Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'when'., Choose a different name., {variableName: when}]) + listener: handleRecoverableError(Message[Template(IllegalPatternAssignmentVariableName), A variable assigned by a pattern assignment can't be named 'when'., Choose a different name., {variableName: when}], when, when) listener: handleAssignedVariablePattern(when) listener: endPattern(when) ensureCloseParen(when, () diff --git a/pkg/front_end/parser_testcases/patterns/const_patterns.dart.expect b/pkg/front_end/parser_testcases/patterns/const_patterns.dart.expect index 12fa11d9496..847093e3be1 100644 --- a/pkg/front_end/parser_testcases/patterns/const_patterns.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/const_patterns.dart.expect @@ -628,7 +628,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: +}], +, +) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: +}], +, +) beginBinaryExpression(+) handleLiteralInt(2) endBinaryExpression(+, 2) @@ -640,7 +640,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: *}], *, *) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: *}], *, *) beginBinaryExpression(*) handleLiteralInt(2) endBinaryExpression(*, 2) @@ -724,7 +724,7 @@ beginCompilationUnit(import) beginCaseExpression(case) beginPattern(case) beginConstantPattern(null) - handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: !}], !, !) + handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: !}], !, !) handleLiteralBool(false) handleUnaryPrefixExpression(!) endConstantPattern(null) @@ -734,7 +734,7 @@ beginCompilationUnit(import) beginCaseExpression(case) beginPattern(case) beginConstantPattern(null) - handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ~}], ~, ~) + handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ~}], ~, ~) handleLiteralInt(0) handleUnaryPrefixExpression(~) endConstantPattern(null) @@ -992,7 +992,7 @@ beginCompilationUnit(import) beginCaseExpression(case) beginPattern(case) beginConstantPattern(const) - handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: !}], !, !) + handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: !}], !, !) handleLiteralBool(false) handleUnaryPrefixExpression(!) endConstantPattern(const) @@ -1002,7 +1002,7 @@ beginCompilationUnit(import) beginCaseExpression(case) beginPattern(case) beginConstantPattern(const) - handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ~}], ~, ~) + handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ~}], ~, ~) handleLiteralInt(0) handleUnaryPrefixExpression(~) endConstantPattern(const) 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 0a99c82285e..e6d9fcc2226 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 @@ -862,8 +862,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(+, Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: +}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: +}], +, +) + reportRecoverableError(+, Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: +}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: +}], +, +) listener: beginBinaryExpression(+) parsePrecedenceExpression(+, 14, false, ConstantPatternContext.none) parseUnaryExpression(+, false, ConstantPatternContext.none) @@ -887,8 +887,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(*, Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: *}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: *}], *, *) + reportRecoverableError(*, Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: *}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: *}], *, *) listener: beginBinaryExpression(*) parsePrecedenceExpression(*, 15, false, ConstantPatternContext.none) parseUnaryExpression(*, false, ConstantPatternContext.none) @@ -1105,8 +1105,8 @@ parseUnit(import) listener: beginConstantPattern(null) parsePrecedenceExpression(case, 7, false, ConstantPatternContext.implicit) parseUnaryExpression(case, false, ConstantPatternContext.implicit) - reportRecoverableError(!, Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: !}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: !}], !, !) + reportRecoverableError(!, Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: !}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: !}], !, !) parsePrecedenceExpression(!, 16, false, ConstantPatternContext.none) parseUnaryExpression(!, false, ConstantPatternContext.none) parsePrimary(!, expression, ConstantPatternContext.none) @@ -1126,8 +1126,8 @@ parseUnit(import) listener: beginConstantPattern(null) parsePrecedenceExpression(case, 7, false, ConstantPatternContext.implicit) parseUnaryExpression(case, false, ConstantPatternContext.implicit) - reportRecoverableError(~, Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ~}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ~}], ~, ~) + reportRecoverableError(~, Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ~}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ~}], ~, ~) parsePrecedenceExpression(~, 16, false, ConstantPatternContext.none) parseUnaryExpression(~, false, ConstantPatternContext.none) parsePrimary(~, expression, ConstantPatternContext.none) @@ -1666,8 +1666,8 @@ parseUnit(import) listener: beginConstantPattern(const) parsePrecedenceExpression(const, 7, false, ConstantPatternContext.explicit) parseUnaryExpression(const, false, ConstantPatternContext.explicit) - reportRecoverableError(!, Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: !}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: !}], !, !) + reportRecoverableError(!, Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: !}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ! is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: !}], !, !) parsePrecedenceExpression(!, 16, false, ConstantPatternContext.none) parseUnaryExpression(!, false, ConstantPatternContext.none) parsePrimary(!, expression, ConstantPatternContext.none) @@ -1687,8 +1687,8 @@ parseUnit(import) listener: beginConstantPattern(const) parsePrecedenceExpression(const, 7, false, ConstantPatternContext.explicit) parseUnaryExpression(const, false, ConstantPatternContext.explicit) - reportRecoverableError(~, Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ~}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ~}], ~, ~) + reportRecoverableError(~, Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ~}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternUnary), The unary operator ~ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ~}], ~, ~) parsePrecedenceExpression(~, 16, false, ConstantPatternContext.none) parseUnaryExpression(~, false, ConstantPatternContext.none) parsePrimary(~, expression, ConstantPatternContext.none) diff --git a/pkg/front_end/parser_testcases/patterns/const_patterns_binary.dart.expect b/pkg/front_end/parser_testcases/patterns/const_patterns_binary.dart.expect index b962e10d6ab..e530f13c440 100644 --- a/pkg/front_end/parser_testcases/patterns/const_patterns_binary.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/const_patterns_binary.dart.expect @@ -406,7 +406,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: +}], +, +) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: +}], +, +) beginBinaryExpression(+) handleLiteralInt(2) endBinaryExpression(+, 2) @@ -418,7 +418,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator - is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: -}], -, -) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator - is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: -}], -, -) beginBinaryExpression(-) handleLiteralInt(2) endBinaryExpression(-, 2) @@ -430,7 +430,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: *}], *, *) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: *}], *, *) beginBinaryExpression(*) handleLiteralInt(2) endBinaryExpression(*, 2) @@ -442,7 +442,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator / is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: /}], /, /) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator / is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: /}], /, /) beginBinaryExpression(/) handleLiteralInt(2) endBinaryExpression(/, 2) @@ -454,7 +454,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator ~/ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ~/}], ~/, ~/) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator ~/ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ~/}], ~/, ~/) beginBinaryExpression(~/) handleLiteralInt(2) endBinaryExpression(~/, 2) @@ -466,7 +466,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator % is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: %}], %, %) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator % is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: %}], %, %) beginBinaryExpression(%) handleLiteralInt(2) endBinaryExpression(%, 2) @@ -478,7 +478,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator == is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ==}], ==, ==) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator == is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ==}], ==, ==) beginBinaryExpression(==) handleLiteralInt(2) endBinaryExpression(==, 2) @@ -490,7 +490,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator != is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: !=}], !=, !=) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator != is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: !=}], !=, !=) beginBinaryExpression(!=) handleLiteralInt(2) endBinaryExpression(!=, 2) @@ -502,7 +502,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator ^ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ^}], ^, ^) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator ^ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ^}], ^, ^) beginBinaryExpression(^) handleLiteralInt(2) endBinaryExpression(^, 2) @@ -514,7 +514,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator & is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: &}], &, &) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator & is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: &}], &, &) beginBinaryExpression(&) handleLiteralInt(2) endBinaryExpression(&, 2) @@ -526,7 +526,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator | is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: |}], |, |) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator | is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: |}], |, |) beginBinaryExpression(|) handleLiteralInt(2) endBinaryExpression(|, 2) @@ -538,7 +538,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator < is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: <}], <, <) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator < is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: <}], <, <) beginBinaryExpression(<) handleLiteralInt(2) endBinaryExpression(<, 2) @@ -550,7 +550,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator <= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: <=}], <=, <=) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator <= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: <=}], <=, <=) beginBinaryExpression(<=) handleLiteralInt(2) endBinaryExpression(<=, 2) @@ -562,7 +562,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator > is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >}], >, >) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator > is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >}], >, >) beginBinaryExpression(>) handleLiteralInt(2) endBinaryExpression(>, 2) @@ -574,7 +574,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >=}], >=, >=) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >=}], >=, >=) beginBinaryExpression(>=) handleLiteralInt(2) endBinaryExpression(>=, 2) @@ -586,7 +586,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator << is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: <<}], <<, <<) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator << is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: <<}], <<, <<) beginBinaryExpression(<<) handleLiteralInt(2) endBinaryExpression(<<, 2) @@ -598,7 +598,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >>}], >>, >>) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >>}], >>, >>) beginBinaryExpression(>>) handleLiteralInt(2) endBinaryExpression(>>, 2) @@ -610,7 +610,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >>> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >>>}], >>>, >>>) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >>> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >>>}], >>>, >>>) beginBinaryExpression(>>>) handleLiteralInt(2) endBinaryExpression(>>>, 2) @@ -622,7 +622,7 @@ beginCompilationUnit(import) beginPattern(case) beginConstantPattern(null) handleLiteralInt(1) - handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: +}], +, +) + handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: +}], +, +) beginBinaryExpression(+) handleLiteralInt(2) endBinaryExpression(+, 2) 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 8553778ee94..d101bfd166e 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 @@ -292,8 +292,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(+, Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: +}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: +}], +, +) + reportRecoverableError(+, Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: +}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: +}], +, +) listener: beginBinaryExpression(+) parsePrecedenceExpression(+, 14, false, ConstantPatternContext.none) parseUnaryExpression(+, false, ConstantPatternContext.none) @@ -317,8 +317,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(-, Message[Template(InvalidConstantPatternBinary), The binary operator - is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: -}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator - is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: -}], -, -) + reportRecoverableError(-, Message[Template(InvalidConstantPatternBinary), The binary operator - is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: -}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator - is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: -}], -, -) listener: beginBinaryExpression(-) parsePrecedenceExpression(-, 14, false, ConstantPatternContext.none) parseUnaryExpression(-, false, ConstantPatternContext.none) @@ -342,8 +342,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(*, Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: *}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: *}], *, *) + reportRecoverableError(*, Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: *}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator * is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: *}], *, *) listener: beginBinaryExpression(*) parsePrecedenceExpression(*, 15, false, ConstantPatternContext.none) parseUnaryExpression(*, false, ConstantPatternContext.none) @@ -367,8 +367,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(/, Message[Template(InvalidConstantPatternBinary), The binary operator / is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: /}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator / is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: /}], /, /) + reportRecoverableError(/, Message[Template(InvalidConstantPatternBinary), The binary operator / is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: /}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator / is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: /}], /, /) listener: beginBinaryExpression(/) parsePrecedenceExpression(/, 15, false, ConstantPatternContext.none) parseUnaryExpression(/, false, ConstantPatternContext.none) @@ -392,8 +392,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(~/, Message[Template(InvalidConstantPatternBinary), The binary operator ~/ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ~/}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator ~/ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ~/}], ~/, ~/) + reportRecoverableError(~/, Message[Template(InvalidConstantPatternBinary), The binary operator ~/ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ~/}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator ~/ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ~/}], ~/, ~/) listener: beginBinaryExpression(~/) parsePrecedenceExpression(~/, 15, false, ConstantPatternContext.none) parseUnaryExpression(~/, false, ConstantPatternContext.none) @@ -417,8 +417,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(%, Message[Template(InvalidConstantPatternBinary), The binary operator % is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: %}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator % is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: %}], %, %) + reportRecoverableError(%, Message[Template(InvalidConstantPatternBinary), The binary operator % is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: %}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator % is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: %}], %, %) listener: beginBinaryExpression(%) parsePrecedenceExpression(%, 15, false, ConstantPatternContext.none) parseUnaryExpression(%, false, ConstantPatternContext.none) @@ -442,8 +442,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(==, Message[Template(InvalidConstantPatternBinary), The binary operator == is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ==}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator == is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ==}], ==, ==) + reportRecoverableError(==, Message[Template(InvalidConstantPatternBinary), The binary operator == is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ==}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator == is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ==}], ==, ==) listener: beginBinaryExpression(==) parsePrecedenceExpression(==, 8, false, ConstantPatternContext.none) parseUnaryExpression(==, false, ConstantPatternContext.none) @@ -467,8 +467,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(!=, Message[Template(InvalidConstantPatternBinary), The binary operator != is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: !=}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator != is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: !=}], !=, !=) + reportRecoverableError(!=, Message[Template(InvalidConstantPatternBinary), The binary operator != is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: !=}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator != is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: !=}], !=, !=) listener: beginBinaryExpression(!=) parsePrecedenceExpression(!=, 8, false, ConstantPatternContext.none) parseUnaryExpression(!=, false, ConstantPatternContext.none) @@ -492,8 +492,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(^, Message[Template(InvalidConstantPatternBinary), The binary operator ^ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ^}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator ^ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: ^}], ^, ^) + reportRecoverableError(^, Message[Template(InvalidConstantPatternBinary), The binary operator ^ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ^}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator ^ is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: ^}], ^, ^) listener: beginBinaryExpression(^) parsePrecedenceExpression(^, 11, false, ConstantPatternContext.none) parseUnaryExpression(^, false, ConstantPatternContext.none) @@ -517,8 +517,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(&, Message[Template(InvalidConstantPatternBinary), The binary operator & is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: &}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator & is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: &}], &, &) + reportRecoverableError(&, Message[Template(InvalidConstantPatternBinary), The binary operator & is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: &}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator & is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: &}], &, &) listener: beginBinaryExpression(&) parsePrecedenceExpression(&, 12, false, ConstantPatternContext.none) parseUnaryExpression(&, false, ConstantPatternContext.none) @@ -542,8 +542,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(|, Message[Template(InvalidConstantPatternBinary), The binary operator | is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: |}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator | is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: |}], |, |) + reportRecoverableError(|, Message[Template(InvalidConstantPatternBinary), The binary operator | is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: |}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator | is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: |}], |, |) listener: beginBinaryExpression(|) parsePrecedenceExpression(|, 10, false, ConstantPatternContext.none) parseUnaryExpression(|, false, ConstantPatternContext.none) @@ -567,8 +567,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(<, Message[Template(InvalidConstantPatternBinary), The binary operator < is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: <}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator < is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: <}], <, <) + reportRecoverableError(<, Message[Template(InvalidConstantPatternBinary), The binary operator < is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: <}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator < is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: <}], <, <) listener: beginBinaryExpression(<) parsePrecedenceExpression(<, 9, false, ConstantPatternContext.none) parseUnaryExpression(<, false, ConstantPatternContext.none) @@ -592,8 +592,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(<=, Message[Template(InvalidConstantPatternBinary), The binary operator <= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: <=}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator <= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: <=}], <=, <=) + reportRecoverableError(<=, Message[Template(InvalidConstantPatternBinary), The binary operator <= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: <=}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator <= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: <=}], <=, <=) listener: beginBinaryExpression(<=) parsePrecedenceExpression(<=, 9, false, ConstantPatternContext.none) parseUnaryExpression(<=, false, ConstantPatternContext.none) @@ -617,8 +617,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(>, Message[Template(InvalidConstantPatternBinary), The binary operator > is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator > is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >}], >, >) + reportRecoverableError(>, Message[Template(InvalidConstantPatternBinary), The binary operator > is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator > is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >}], >, >) listener: beginBinaryExpression(>) parsePrecedenceExpression(>, 9, false, ConstantPatternContext.none) parseUnaryExpression(>, false, ConstantPatternContext.none) @@ -642,8 +642,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(>=, Message[Template(InvalidConstantPatternBinary), The binary operator >= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >=}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >=}], >=, >=) + reportRecoverableError(>=, Message[Template(InvalidConstantPatternBinary), The binary operator >= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >=}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >= is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >=}], >=, >=) listener: beginBinaryExpression(>=) parsePrecedenceExpression(>=, 9, false, ConstantPatternContext.none) parseUnaryExpression(>=, false, ConstantPatternContext.none) @@ -667,8 +667,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(<<, Message[Template(InvalidConstantPatternBinary), The binary operator << is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: <<}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator << is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: <<}], <<, <<) + reportRecoverableError(<<, Message[Template(InvalidConstantPatternBinary), The binary operator << is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: <<}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator << is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: <<}], <<, <<) listener: beginBinaryExpression(<<) parsePrecedenceExpression(<<, 13, false, ConstantPatternContext.none) parseUnaryExpression(<<, false, ConstantPatternContext.none) @@ -692,8 +692,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(>>, Message[Template(InvalidConstantPatternBinary), The binary operator >> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >>}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >>}], >>, >>) + reportRecoverableError(>>, Message[Template(InvalidConstantPatternBinary), The binary operator >> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >>}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >>}], >>, >>) listener: beginBinaryExpression(>>) parsePrecedenceExpression(>>, 13, false, ConstantPatternContext.none) parseUnaryExpression(>>, false, ConstantPatternContext.none) @@ -717,8 +717,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(>>>, Message[Template(InvalidConstantPatternBinary), The binary operator >>> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >>>}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >>> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: >>>}], >>>, >>>) + reportRecoverableError(>>>, Message[Template(InvalidConstantPatternBinary), The binary operator >>> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >>>}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator >>> is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: >>>}], >>>, >>>) listener: beginBinaryExpression(>>>) parsePrecedenceExpression(>>>, 13, false, ConstantPatternContext.none) parseUnaryExpression(>>>, false, ConstantPatternContext.none) @@ -742,8 +742,8 @@ parseUnit(import) parsePrimary(case, expression, ConstantPatternContext.implicit) parseLiteralInt(case) listener: handleLiteralInt(1) - reportRecoverableError(+, Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: +}]) - listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {name: +}], +, +) + reportRecoverableError(+, Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: +}]) + listener: handleRecoverableError(Message[Template(InvalidConstantPatternBinary), The binary operator + is not supported as a constant pattern., Try wrapping the expression in 'const ( ... )'., {operatorName: +}], +, +) listener: beginBinaryExpression(+) parsePrecedenceExpression(+, 14, false, ConstantPatternContext.none) parseUnaryExpression(+, false, ConstantPatternContext.none) diff --git a/pkg/front_end/parser_testcases/patterns/constant_identifier_namedAs.dart.expect b/pkg/front_end/parser_testcases/patterns/constant_identifier_namedAs.dart.expect index 8003ceaab66..666821f1227 100644 --- a/pkg/front_end/parser_testcases/patterns/constant_identifier_namedAs.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/constant_identifier_namedAs.dart.expect @@ -32,7 +32,7 @@ beginCompilationUnit(void) beginSwitchBlock({) beginCaseExpression(case) beginPattern(case) - handleRecoverableError(Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'as'., Match the identifier using '==, {lexeme: as}], as, as) + handleRecoverableError(Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'as'., Match the identifier using '==, {identifier: as}], as, as) beginConstantPattern(null) handleIdentifier(as, expression) handleNoTypeArguments(:) diff --git a/pkg/front_end/parser_testcases/patterns/constant_identifier_namedAs.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/constant_identifier_namedAs.dart.intertwined.expect index 8c91be1c33c..f929d471c2d 100644 --- a/pkg/front_end/parser_testcases/patterns/constant_identifier_namedAs.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/constant_identifier_namedAs.dart.intertwined.expect @@ -68,8 +68,8 @@ parseUnit(void) parsePattern(case, PatternContext.matching, precedence: 1) listener: beginPattern(case) parsePrimaryPattern(case, PatternContext.matching) - reportRecoverableError(as, Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'as'., Match the identifier using '==, {lexeme: as}]) - listener: handleRecoverableError(Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'as'., Match the identifier using '==, {lexeme: as}], as, as) + reportRecoverableError(as, Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'as'., Match the identifier using '==, {identifier: as}]) + listener: handleRecoverableError(Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'as'., Match the identifier using '==, {identifier: as}], as, as) listener: beginConstantPattern(null) parsePrecedenceExpression(case, 7, false, ConstantPatternContext.implicit) parseUnaryExpression(case, false, ConstantPatternContext.implicit) diff --git a/pkg/front_end/parser_testcases/patterns/constant_identifier_namedWhen.dart.expect b/pkg/front_end/parser_testcases/patterns/constant_identifier_namedWhen.dart.expect index 5e7008bc1c5..94676980716 100644 --- a/pkg/front_end/parser_testcases/patterns/constant_identifier_namedWhen.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/constant_identifier_namedWhen.dart.expect @@ -32,7 +32,7 @@ beginCompilationUnit(void) beginSwitchBlock({) beginCaseExpression(case) beginPattern(case) - handleRecoverableError(Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'when'., Match the identifier using '==, {lexeme: when}], when, when) + handleRecoverableError(Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'when'., Match the identifier using '==, {identifier: when}], when, when) beginConstantPattern(null) handleIdentifier(when, expression) handleNoTypeArguments(:) diff --git a/pkg/front_end/parser_testcases/patterns/constant_identifier_namedWhen.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/constant_identifier_namedWhen.dart.intertwined.expect index 8ce390884ab..fd0d53d8f57 100644 --- a/pkg/front_end/parser_testcases/patterns/constant_identifier_namedWhen.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/constant_identifier_namedWhen.dart.intertwined.expect @@ -68,8 +68,8 @@ parseUnit(void) parsePattern(case, PatternContext.matching, precedence: 1) listener: beginPattern(case) parsePrimaryPattern(case, PatternContext.matching) - reportRecoverableError(when, Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'when'., Match the identifier using '==, {lexeme: when}]) - listener: handleRecoverableError(Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'when'., Match the identifier using '==, {lexeme: when}], when, when) + reportRecoverableError(when, Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'when'., Match the identifier using '==, {identifier: when}]) + listener: handleRecoverableError(Message[Template(IllegalPatternIdentifierName), A pattern can't refer to an identifier named 'when'., Match the identifier using '==, {identifier: when}], when, when) listener: beginConstantPattern(null) parsePrecedenceExpression(case, 7, false, ConstantPatternContext.implicit) parseUnaryExpression(case, false, ConstantPatternContext.implicit) diff --git a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinal.dart.expect b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinal.dart.expect index a41a971b961..7339a0278df 100644 --- a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinal.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinal.dart.expect @@ -23,7 +23,7 @@ beginCompilationUnit(void) endPattern(a) beginPattern(,) handleNoType(final) - handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}], d, d) + handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}], d, d) handleDeclaredVariablePattern(final, d, true) endPattern(d) handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinal.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinal.dart.intertwined.expect index 3784a10bf57..809639e2254 100644 --- a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinal.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinal.dart.intertwined.expect @@ -52,8 +52,8 @@ parseUnit(void) parsePrimaryPattern(,, PatternContext.assignment) parseVariablePattern(,, PatternContext.assignment, typeInfo: NoType()) listener: handleNoType(final) - reportRecoverableError(d, Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}]) - listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}], d, d) + reportRecoverableError(d, Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}]) + listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}], d, d) listener: handleDeclaredVariablePattern(final, d, true) listener: endPattern(d) listener: handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinalAndType.dart.expect b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinalAndType.dart.expect index c23cd764b4d..3df1e773f26 100644 --- a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinalAndType.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinalAndType.dart.expect @@ -25,7 +25,7 @@ beginCompilationUnit(void) handleIdentifier(int, typeReference) handleNoTypeArguments(d) handleType(int, null) - handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}], d, d) + handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}], d, d) handleDeclaredVariablePattern(final, d, true) endPattern(d) handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinalAndType.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinalAndType.dart.intertwined.expect index 9622aed58c7..bdb3cefdb82 100644 --- a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinalAndType.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingFinalAndType.dart.intertwined.expect @@ -54,8 +54,8 @@ parseUnit(void) listener: handleIdentifier(int, typeReference) listener: handleNoTypeArguments(d) listener: handleType(int, null) - reportRecoverableError(d, Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}]) - listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}], d, d) + reportRecoverableError(d, Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}]) + listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}], d, d) listener: handleDeclaredVariablePattern(final, d, true) listener: endPattern(d) listener: handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingType.dart.expect b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingType.dart.expect index 79afadb78dd..00c71af0017 100644 --- a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingType.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingType.dart.expect @@ -25,7 +25,7 @@ beginCompilationUnit(void) handleIdentifier(int, typeReference) handleNoTypeArguments(d) handleType(int, null) - handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}], d, d) + handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}], d, d) handleDeclaredVariablePattern(null, d, true) endPattern(d) handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingType.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingType.dart.intertwined.expect index c429eed4e43..5661c14c7df 100644 --- a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingType.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingType.dart.intertwined.expect @@ -54,8 +54,8 @@ parseUnit(void) listener: handleIdentifier(int, typeReference) listener: handleNoTypeArguments(d) listener: handleType(int, null) - reportRecoverableError(d, Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}]) - listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}], d, d) + reportRecoverableError(d, Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}]) + listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}], d, d) listener: handleDeclaredVariablePattern(null, d, true) listener: endPattern(d) listener: handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVar.dart.expect b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVar.dart.expect index 05e70492a3b..f20c41ab344 100644 --- a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVar.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVar.dart.expect @@ -23,7 +23,7 @@ beginCompilationUnit(void) endPattern(a) beginPattern(,) handleNoType(var) - handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}], d, d) + handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}], d, d) handleDeclaredVariablePattern(var, d, true) endPattern(d) handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVar.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVar.dart.intertwined.expect index 151a4b2f2af..c315331dd8b 100644 --- a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVar.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVar.dart.intertwined.expect @@ -52,8 +52,8 @@ parseUnit(void) parsePrimaryPattern(,, PatternContext.assignment) parseVariablePattern(,, PatternContext.assignment, typeInfo: NoType()) listener: handleNoType(var) - reportRecoverableError(d, Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}]) - listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}], d, d) + reportRecoverableError(d, Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}]) + listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}], d, d) listener: handleDeclaredVariablePattern(var, d, true) listener: endPattern(d) listener: handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVarAndType.dart.expect b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVarAndType.dart.expect index 493b3b8ab23..6a3db835f2c 100644 --- a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVarAndType.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVarAndType.dart.expect @@ -25,7 +25,7 @@ beginCompilationUnit(void) handleIdentifier(int, typeReference) handleNoTypeArguments(d) handleType(int, null) - handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}], d, d) + handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}], d, d) handleDeclaredVariablePattern(var, d, true) endPattern(d) handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVarAndType.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVarAndType.dart.intertwined.expect index cab2c90900d..d95048397e4 100644 --- a/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVarAndType.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/declaredVariable_inPatternAssignment_usingVarAndType.dart.intertwined.expect @@ -54,8 +54,8 @@ parseUnit(void) listener: handleIdentifier(int, typeReference) listener: handleNoTypeArguments(d) listener: handleType(int, null) - reportRecoverableError(d, Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}]) - listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: d}], d, d) + reportRecoverableError(d, Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}]) + listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable 'd' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: d}], d, d) listener: handleDeclaredVariablePattern(var, d, true) listener: endPattern(d) listener: handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/variable_namedAs.dart.expect b/pkg/front_end/parser_testcases/patterns/variable_namedAs.dart.expect index 161d1d34a6d..0ff9f908cd3 100644 --- a/pkg/front_end/parser_testcases/patterns/variable_namedAs.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/variable_namedAs.dart.expect @@ -33,7 +33,7 @@ beginCompilationUnit(void) beginCaseExpression(case) beginPattern(case) handleNoType(var) - handleRecoverableError(Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'as'., Choose a different name., {lexeme: as}], as, as) + handleRecoverableError(Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'as'., Choose a different name., {variableName: as}], as, as) handleDeclaredVariablePattern(var, as, false) endPattern(as) handleSwitchCaseNoWhenClause(as) diff --git a/pkg/front_end/parser_testcases/patterns/variable_namedAs.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/variable_namedAs.dart.intertwined.expect index 01b6d2383e6..1bea40c793d 100644 --- a/pkg/front_end/parser_testcases/patterns/variable_namedAs.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/variable_namedAs.dart.intertwined.expect @@ -70,8 +70,8 @@ parseUnit(void) parsePrimaryPattern(case, PatternContext.matching) parseVariablePattern(case, PatternContext.matching, typeInfo: NoType()) listener: handleNoType(var) - reportRecoverableError(as, Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'as'., Choose a different name., {lexeme: as}]) - listener: handleRecoverableError(Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'as'., Choose a different name., {lexeme: as}], as, as) + reportRecoverableError(as, Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'as'., Choose a different name., {variableName: as}]) + listener: handleRecoverableError(Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'as'., Choose a different name., {variableName: as}], as, as) listener: handleDeclaredVariablePattern(var, as, false) listener: endPattern(as) listener: handleSwitchCaseNoWhenClause(as) diff --git a/pkg/front_end/parser_testcases/patterns/variable_namedWhen.dart.expect b/pkg/front_end/parser_testcases/patterns/variable_namedWhen.dart.expect index a458ecead4a..1ccc39f4ce6 100644 --- a/pkg/front_end/parser_testcases/patterns/variable_namedWhen.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/variable_namedWhen.dart.expect @@ -33,7 +33,7 @@ beginCompilationUnit(void) beginCaseExpression(case) beginPattern(case) handleNoType(var) - handleRecoverableError(Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'when'., Choose a different name., {lexeme: when}], when, when) + handleRecoverableError(Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'when'., Choose a different name., {variableName: when}], when, when) handleDeclaredVariablePattern(var, when, false) endPattern(when) handleSwitchCaseNoWhenClause(when) diff --git a/pkg/front_end/parser_testcases/patterns/variable_namedWhen.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/variable_namedWhen.dart.intertwined.expect index 0305581712f..8c81eb9281b 100644 --- a/pkg/front_end/parser_testcases/patterns/variable_namedWhen.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/variable_namedWhen.dart.intertwined.expect @@ -70,8 +70,8 @@ parseUnit(void) parsePrimaryPattern(case, PatternContext.matching) parseVariablePattern(case, PatternContext.matching, typeInfo: NoType()) listener: handleNoType(var) - reportRecoverableError(when, Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'when'., Choose a different name., {lexeme: when}]) - listener: handleRecoverableError(Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'when'., Choose a different name., {lexeme: when}], when, when) + reportRecoverableError(when, Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'when'., Choose a different name., {variableName: when}]) + listener: handleRecoverableError(Message[Template(IllegalPatternVariableName), The variable declared by a variable pattern can't be named 'when'., Choose a different name., {variableName: when}], when, when) listener: handleDeclaredVariablePattern(var, when, false) listener: endPattern(when) listener: handleSwitchCaseNoWhenClause(when) diff --git a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinal.dart.expect b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinal.dart.expect index 744eea672cb..6a706fcc32b 100644 --- a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinal.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinal.dart.expect @@ -23,7 +23,7 @@ beginCompilationUnit(void) endPattern(a) beginPattern(,) handleNoType(final) - handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}], _, _) + handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}], _, _) handleWildcardPattern(final, _) endPattern(_) handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinal.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinal.dart.intertwined.expect index bb58facdf15..d763cc484bb 100644 --- a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinal.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinal.dart.intertwined.expect @@ -52,8 +52,8 @@ parseUnit(void) parsePrimaryPattern(,, PatternContext.assignment) parseVariablePattern(,, PatternContext.assignment, typeInfo: NoType()) listener: handleNoType(final) - reportRecoverableError(_, Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}]) - listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}], _, _) + reportRecoverableError(_, Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}]) + listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}], _, _) listener: handleWildcardPattern(final, _) listener: endPattern(_) listener: handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinalAndType.dart.expect b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinalAndType.dart.expect index 8575e285ea4..7ff62a23944 100644 --- a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinalAndType.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinalAndType.dart.expect @@ -25,7 +25,7 @@ beginCompilationUnit(void) handleIdentifier(int, typeReference) handleNoTypeArguments(_) handleType(int, null) - handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}], _, _) + handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}], _, _) handleWildcardPattern(final, _) endPattern(_) handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinalAndType.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinalAndType.dart.intertwined.expect index ad0c275b050..ee4a7d9dfb2 100644 --- a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinalAndType.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingFinalAndType.dart.intertwined.expect @@ -54,8 +54,8 @@ parseUnit(void) listener: handleIdentifier(int, typeReference) listener: handleNoTypeArguments(_) listener: handleType(int, null) - reportRecoverableError(_, Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}]) - listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}], _, _) + reportRecoverableError(_, Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}]) + listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}], _, _) listener: handleWildcardPattern(final, _) listener: endPattern(_) listener: handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingType.dart.expect b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingType.dart.expect index ba5c3821281..5d0150d164e 100644 --- a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingType.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingType.dart.expect @@ -25,7 +25,7 @@ beginCompilationUnit(void) handleIdentifier(int, typeReference) handleNoTypeArguments(_) handleType(int, null) - handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}], _, _) + handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}], _, _) handleWildcardPattern(null, _) endPattern(_) handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingType.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingType.dart.intertwined.expect index 66429e1bfbc..7fc5bcfeb9a 100644 --- a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingType.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingType.dart.intertwined.expect @@ -54,8 +54,8 @@ parseUnit(void) listener: handleIdentifier(int, typeReference) listener: handleNoTypeArguments(_) listener: handleType(int, null) - reportRecoverableError(_, Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}]) - listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}], _, _) + reportRecoverableError(_, Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}]) + listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}], _, _) listener: handleWildcardPattern(null, _) listener: endPattern(_) listener: handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVar.dart.expect b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVar.dart.expect index b098fef8c78..7dc55dad6f4 100644 --- a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVar.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVar.dart.expect @@ -23,7 +23,7 @@ beginCompilationUnit(void) endPattern(a) beginPattern(,) handleNoType(var) - handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}], _, _) + handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}], _, _) handleWildcardPattern(var, _) endPattern(_) handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVar.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVar.dart.intertwined.expect index 76a46d8392b..5ecf71edc39 100644 --- a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVar.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVar.dart.intertwined.expect @@ -52,8 +52,8 @@ parseUnit(void) parsePrimaryPattern(,, PatternContext.assignment) parseVariablePattern(,, PatternContext.assignment, typeInfo: NoType()) listener: handleNoType(var) - reportRecoverableError(_, Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}]) - listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}], _, _) + reportRecoverableError(_, Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}]) + listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}], _, _) listener: handleWildcardPattern(var, _) listener: endPattern(_) listener: handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVarAndType.dart.expect b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVarAndType.dart.expect index 5c6cd388b73..7a9be871787 100644 --- a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVarAndType.dart.expect +++ b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVarAndType.dart.expect @@ -25,7 +25,7 @@ beginCompilationUnit(void) handleIdentifier(int, typeReference) handleNoTypeArguments(_) handleType(int, null) - handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}], _, _) + handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}], _, _) handleWildcardPattern(var, _) endPattern(_) handleListPattern(2, [, ]) diff --git a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVarAndType.dart.intertwined.expect b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVarAndType.dart.intertwined.expect index e5476d2b41c..46491947922 100644 --- a/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVarAndType.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/patterns/wildcard_inPatternAssignment_usingVarAndType.dart.intertwined.expect @@ -54,8 +54,8 @@ parseUnit(void) listener: handleIdentifier(int, typeReference) listener: handleNoTypeArguments(_) listener: handleType(int, null) - reportRecoverableError(_, Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}]) - listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {name: _}], _, _) + reportRecoverableError(_, Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}]) + listener: handleRecoverableError(Message[Template(PatternAssignmentDeclaresVariable), Variable '_' can't be declared in a pattern assignment., Try using a preexisting variable or changing the assignment to a pattern variable declaration., {variableName: _}], _, _) listener: handleWildcardPattern(var, _) listener: endPattern(_) listener: handleListPattern(2, [, ])