9404899248
This splits handleEndingBinaryExpression into two new listeners handleDotAccess for `.` and `?.` access and handleCascadeAccess for `..` and `?..`, both with an explicit `isNullAware` flag. This is a step towards handling `a.b` different from `a + b` in the parser such that listeners don't have to create a value for `b` the works in both use cases; in the first is just a named operation performed on the receiver, whereas in the second case it is a full expression in its own right. Change-Id: I04ec80401f8f2dbb8dffa86543c434e530b18cf7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/442821 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Jens Johansen <jensj@google.com>
38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
beginCompilationUnit(f)
|
|
beginMetadataStar(f)
|
|
endMetadataStar(0)
|
|
beginTopLevelMember(f)
|
|
beginTopLevelMethod(, null, null)
|
|
handleNoType()
|
|
handleIdentifier(f, topLevelFunctionDeclaration)
|
|
handleNoTypeVariables(()
|
|
beginFormalParameters((, MemberKind.TopLevelMethod)
|
|
endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
|
|
handleAsyncModifier(null, null)
|
|
beginBlockFunctionBody({)
|
|
handleIdentifier(foo, expression)
|
|
handleNoTypeArguments(.)
|
|
handleNoArguments(.)
|
|
handleSend(foo, foo)
|
|
handleIdentifier(bar, expressionContinuation)
|
|
handleNoTypeArguments(!)
|
|
handleNoArguments(!)
|
|
handleSend(bar, bar)
|
|
handleDotAccess(., bar, false)
|
|
handleNonNullAssertExpression(!)
|
|
handleIdentifier(baz, expressionContinuation)
|
|
handleNoTypeArguments([)
|
|
handleNoArguments([)
|
|
handleSend(baz, baz)
|
|
handleDotAccess(., baz, false)
|
|
handleIdentifier(arg, expression)
|
|
handleNoTypeArguments(])
|
|
handleNoArguments(])
|
|
handleSend(arg, arg)
|
|
handleIndexedExpression(null, [, ])
|
|
handleExpressionStatement(foo, ;)
|
|
endBlockFunctionBody(1, {, })
|
|
endTopLevelMethod(f, null, })
|
|
endTopLevelDeclaration(})
|
|
endCompilationUnit(1, )
|