38cab10852
Variable patterns behave so differently inside a patternAssignment that we may want to represent them using different AST nodes inside the analyzer/CFE. This change adds a boolean flag allowing the implementation to know what kind of variable pattern it's looking at when parsing occurs. Bug: https://github.com/dart-lang/sdk/issues/50035 Change-Id: I60adf2865bbe24f85b72a79b1360833bf823bd67 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273829 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Jens Johansen <jensj@google.com>
43 lines
1.7 KiB
Plaintext
43 lines
1.7 KiB
Plaintext
beginCompilationUnit(void)
|
|
beginMetadataStar(void)
|
|
endMetadataStar(0)
|
|
beginTopLevelMember(void)
|
|
beginTopLevelMethod(, null, null)
|
|
handleVoidKeyword(void)
|
|
handleIdentifier(f, topLevelFunctionDeclaration)
|
|
handleNoTypeVariables(()
|
|
beginFormalParameters((, MemberKind.TopLevelMethod)
|
|
beginMetadataStar(x)
|
|
endMetadataStar(0)
|
|
beginFormalParameter(x, MemberKind.TopLevelMethod, null, null, null)
|
|
handleNoType(()
|
|
handleIdentifier(x, formalParameterDeclaration)
|
|
handleFormalParameterWithoutValue())
|
|
endFormalParameter(null, null, null, x, null, null, FormalParameterKind.requiredPositional, MemberKind.TopLevelMethod)
|
|
endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
|
|
handleAsyncModifier(null, null)
|
|
beginBlockFunctionBody({)
|
|
beginSwitchStatement(switch)
|
|
handleIdentifier(x, expression)
|
|
handleNoTypeArguments())
|
|
handleNoArguments())
|
|
handleSend(x, ))
|
|
handleParenthesizedCondition((, null, null)
|
|
beginSwitchBlock({)
|
|
beginCaseExpression(case)
|
|
handleNoTypeArguments({)
|
|
handleNoType(var)
|
|
handleVariablePattern(var, y, false)
|
|
handleRestPattern(..., true)
|
|
handleMapPattern(1, {, })
|
|
endCaseExpression(case, null, :)
|
|
beginSwitchCase(0, 1, case)
|
|
handleBreakStatement(false, break, ;)
|
|
endSwitchCase(0, 1, null, null, 1, case, })
|
|
endSwitchBlock(1, {, })
|
|
endSwitchStatement(switch, })
|
|
endBlockFunctionBody(1, {, })
|
|
endTopLevelMethod(void, null, })
|
|
endTopLevelDeclaration()
|
|
endCompilationUnit(1, )
|