sdk
sdk copied to clipboard
Some `PropertyAccess`es are parsed as `PrefixedIdentifier`s
void foo(int value) {
value.isEven;
}
Here is the resolved AST:
CompilationUnitImpl [void foo(int value) {value.isEven;}]
FunctionDeclarationImpl [void foo(int value) {value.isEven;}]
NamedTypeImpl [void]
FunctionExpressionImpl [(int value) {value.isEven;}]
FormalParameterListImpl [(int value)]
SimpleFormalParameterImpl [int value]
NamedTypeImpl [int]
BlockFunctionBodyImpl [{value.isEven;}]
BlockImpl [{value.isEven;}]
ExpressionStatementImpl [value.isEven;]
PrefixedIdentifierImpl [value.isEven]
SimpleIdentifierImpl [value]
SimpleIdentifierImpl [isEven]
I'm not sure if this can be fixed or if this can cause any bugs, but I'm opening this JIC we want to fix it.
Somewhat related to https://github.com/dart-lang/sdk/issues/49434 as a request for reviewing some related AST.
I've talked about this a while ago with @bwilkerson, but I never opened an issue.
FYI @DanTup, @srawlins
CC @scheglov