0a154753c6
This [handlePositionalArgument] and [handlePositionalRecordField] methods to the parser listener, allowing listeners to normals arguments and record fields Change-Id: I3947e196dafffea2ab383f797904c857db8327ce Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/469620 Reviewed-by: Jens Johansen <jensj@google.com>
26 lines
949 B
Plaintext
26 lines
949 B
Plaintext
Problems reported:
|
|
|
|
parser/patterns/patternVariableDeclaration_topLevel:1:5: A pattern variable declaration may not appear outside a function or method.
|
|
var (a, b) = (0, 1);
|
|
^^^^^^
|
|
|
|
beginCompilationUnit(var)
|
|
beginMetadataStar(var)
|
|
endMetadataStar(0)
|
|
beginTopLevelMember(var)
|
|
handleRecoverableError(PatternVariableDeclarationOutsideFunctionOrMethod, (, ))
|
|
beginFields(DeclarationKind.TopLevel, null, null, null, null, null, null, var, )
|
|
handleNoType(var)
|
|
handleIdentifier(, topLevelVariableDeclaration)
|
|
beginFieldInitializer(=)
|
|
beginParenthesizedExpressionOrRecordLiteral(()
|
|
handleLiteralInt(0)
|
|
handlePositionalRecordField(0)
|
|
handleLiteralInt(1)
|
|
handlePositionalRecordField(1)
|
|
endRecordLiteral((, 2, null)
|
|
endFieldInitializer(=, ))
|
|
endTopLevelFields(null, null, null, null, null, var, 1, var, ;)
|
|
endTopLevelDeclaration(;)
|
|
endCompilationUnit(1, )
|