Scanner, grammar and parser changes for Switch expressions 2.0 #3264
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SwitchLabelExpr
vsSwitchLabel
...)BeginCaseExpr
followed by '->' in switch rules with a single syntheticCaseArrow
. The scanner will disambiguate whether a token '->' isTokenNameARROW
used in lambdas or is aCaseArrow
used in switch rules by checking if the automaton will shiftCaseArrow
or not.VanguardParser
in reconnaissance missions foryield
and '->' disambiguation.SwitchStatement.resolve()
by simplifying control flow; streamline management of secrets;SelectionParserTest12.java
as it is fully duplicated bySelectionParserTest13.java
; Rename the latter toSelectionParserTest14.java
and ensure it runs in the right compliance mode. Hook up this dangling junit to a parentPrimitiveInPatternsTestSH.java
to work around a bug elsewhere that was masked so far. [Primitive Patterns] Wrong duplicate case error #3265 raised as follow up.FormatterRegressionTests.java
andResolveTests12To15.java
to run at the right compliance levels