atom / language-java

Java package for Atom
Other
62 stars 59 forks source link

Add support for `final` in `catch` parameters #188

Closed 0xc0 closed 5 years ago

0xc0 commented 5 years ago

Description of the Change

The regex for the catch parameters currently does not support final, meaning that final is highlighted as a type. This change adds an optional group to account for the possibility of the Java final modifier.

Alternate Designs

None, as prepending the existing regex is a simple change.

Benefits

Correct syntax highlighting when final is within catch parameters

Possible Drawbacks

None.

Applicable Issues

None.

sadikovi commented 5 years ago

Are there any other keywords available for the catch clause? Have you considered an option of including #storage-modifiers? Can you add a unit test?

0xc0 commented 5 years ago

@sadikovi Updated to use #storage-modifiers (better idea) and added a unit test