RFR: 8302344: Compiler Implementation for Unnamed patterns and variables (Preview) [v12]
Joe Darcy
darcy at openjdk.org
Thu May 4 20:01:23 UTC 2023
On Thu, 4 May 2023 18:20:30 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:
>> yep I agree with this, the parser should set the right name as soon as it sees a `_`
>
> We could indeed if we wanted to store `empty` everywhere. However, after some off-list discussions I updated the CSR (and the code) to include `empty` as the name at the symbol-level (for consistency with javax model) and `_` at the Tree API-level for its version of a name. This is the rationale behind what you see in Attr (for patterns) and member enter for all other cases. @jddarcy what do you think?
>
In terms of pretty printing, src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java may need to be updated too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13528#discussion_r1185457942
More information about the kulla-dev
mailing list