atom / language-java

Java package for Atom
Other
62 stars 58 forks source link

Java tree-sitter grammar does not consistently highlight constants #240

Closed sadikovi closed 3 years ago

sadikovi commented 3 years ago

Prerequisites

Description

For some reason, constants are highlighted differently in java tree-sitter grammar. Here is an example:

conf.set(S3_CLIENT_FACTORY_IMPL, "Test");
conf.set(ENDPOINT, "test-endpoint");

S3_CLIENT_FACTORY_IMPL is not highlighted but ENDPOINT is.

This is due to numbers not being in the pattern. If you remove 3 from S3_CLIENT_FACTORY_IMPL, everything works correctly.

Expected behavior:

S3_CLIENT_FACTORY_IMPL is being highlighted as ENDPOINT.

Actual behavior:

The opposite.

Reproduces how often:

100%

Versions

Additional Information