Closed jtkiesel closed 10 months ago
@clementdessoude Let me know what you think about the formatting choices I made. I went back and forth over a few different styles for formatting switch labels with multiple patterns, and ended up deciding to go with this one, but I'd certainly be open to a different style.
For this one, I think the review will have to wait for next weekend, as it is less trivial than #603 😅
No worries! Initially, I tried to keep my changes to a minimum, but realized that some of the spec deviations were causing a lot of trouble for me, so I ended up aligning things a bit more closely to the spec which helped keep the formatting code a lot simpler.
What changed with this PR:
JDK 22 unnamed variables & patterns, and switch labels with multiple patterns, are now supported.
Example
Input
Output
Relative issues or prs:
Closes #612