Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Highlight keyword 'sealed' for Java 15 #232

Closed
Eskibear opened this issue Sep 16, 2020 · 2 comments · Fixed by #234
Closed

Highlight keyword 'sealed' for Java 15 #232

Eskibear opened this issue Sep 16, 2020 · 2 comments · Fixed by #234
Assignees

Comments

@Eskibear
Copy link
Contributor

See: JEP 360

It's not yet highlighted.
Screen Shot 2020-09-16 at 12 24 31 PM

@fbricon
Copy link

fbricon commented Sep 18, 2020

permits
Screen Shot 2020-09-18 at 5 09 02 PM
and following classes also need to be supported

@sadikovi
Copy link
Contributor

Can you provide java spec for those keywords?

@sadikovi sadikovi changed the title hightlight keyword 'sealed' for Java 15 Highlight keyword 'sealed' for Java 15 Sep 18, 2020
sadikovi added a commit that referenced this issue Sep 19, 2020
### Requirements

* Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
* All new code requires tests to ensure against regressions

### Description of the Change

This PR adds support for JDK 13+ keywords:
- `yield`
- `sealed`
- `permits`

`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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants