prettier-java
prettier-java copied to clipboard
Align use of var keyword with the spec
The var keyword is only allowed to be used as an Identifier in certain contexts and disallowed in others, this is currently not implemented by the parser.
- e.g: https://docs.oracle.com/javase/specs/jls/se11/html/jls-3.html#jls-TypeIdentifier
(Extracted form #113)
I think this could be implemented using token categories to create:
- IdentifierButNotVar category.