Closed fbricon closed 4 years ago
Can you link java documentation about record
keyword? We just need to add it to the grammar, should be fairly easy to do.
RecordDeclaration:
{ClassModifier} record TypeIdentifier [TypeParameters]
(RecordComponents) [SuperInterfaces] [RecordBody]
RecordComponents:
{RecordComponent {, RecordComponent}}
RecordComponent:
{Annotation} UnannType Identifier
RecordBody:
{ {RecordBodyDeclaration} }
RecordBodyDeclaration:
ClassBodyDeclaration
RecordConstructorDeclaration
RecordConstructorDeclaration:
{Annotation} {ConstructorModifier} [TypeParameters] SimpleTypeName
[Throws] ConstructorBody
cited from the JEP above
We don't even support JDK 10 and 11 fully yet 😄. Feel free to open a pull request!
PR created. Below is its looking in vscode.
Prerequisites
Description
Java 14's new record keyword is not highlighted properly
Steps to Reproduce
record Point(int x, int y){}
Expected behavior:
record should be colored as a Java keyword, similar to class or interface
Actual behavior:
record looks meh
Reproduces how often:
100%
cc @Vigilans @akaroml