atom / language-java

Java package for Atom
Other
62 stars 59 forks source link

Add support for "yield", "sealed", and "permits" Java keywords #234

Closed sadikovi closed 4 years ago

sadikovi commented 4 years ago

Requirements

Description of the Change

This PR adds support for JDK 13+ keywords:

yield keyword is similar to return, so it is handled as "keyword.control.java". sealed and permits are only for classes and interfaces: sealed keyword is a "storage.modifier.java" and permits is handled similar to extends and implements keywords.

Alternate Designs

No alternative designs were considered.

Benefits

Fixes highlighting of the aforementioned keywords.

Possible Drawbacks

Might potentially break class extends and implements scopes, but that would have to be a corner case not handled by unit tests.

Applicable Issues

Fixes #230 Fixes #232