Fix syntax highlighting for float literals #4

Merged
sergeichestakov merged 1 commit from fix-floating-point-highlighting into main 2023-02-02 11:16:40 +01:00
sergeichestakov commented 2023-02-01 03:33:10 +01:00 (Migrated from github.com)

I believe this is a bug (but please correct me if I'm wrong): I noticed that the Lezer parser for Java marks floats as FloatingPointLiterals but the syntax highlighting spec refers to them as FloatLiterals.

This results in floats not having proper syntax highlighting in Java. This PR addresses this by fixing the corresponding key in the highlight spec and standardizing on FloatingPointLiteral. I've confirmed that yarn build and yarn test still passes as expected.

I _believe_ this is a bug (but please correct me if I'm wrong): I noticed that the Lezer parser for Java marks floats as [`FloatingPointLiteral`](https://github.com/lezer-parser/java/blob/0f8b487d879b9d9c89ac68a344ae18ab78839579/src/java.grammar#L677)s but the syntax highlighting spec refers to them as `FloatLiteral`s. This results in floats not having proper syntax highlighting in Java. This PR addresses this by fixing the corresponding key in the highlight spec and standardizing on `FloatingPointLiteral`. I've confirmed that `yarn build` and `yarn test` still passes as expected.
marijnh commented 2023-02-02 11:17:55 +01:00 (Migrated from github.com)

Thanks for spotting that!

Thanks for spotting that!
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/java!4
No description provided.