Skip to content

Commit

Permalink
[Java] Fix annoted enum constans (#4002)
Browse files Browse the repository at this point in the history
Fixes #4001
  • Loading branch information
deathaxe authored Jun 27, 2024
1 parent 23c715e commit 3cda1fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Java/Java.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ contexts:
scope: meta.constant.identifier.java entity.name.constant.java
push: enum-constant-arguments
- include: punctuation-separator-comma
- include: else-pop
- include: annotation-else-pop

enum-constant-arguments:
- meta_content_scope: meta.constant.identifier.java
Expand Down
11 changes: 9 additions & 2 deletions Java/tests/syntax_test_java.java
Original file line number Diff line number Diff line change
Expand Up @@ -1751,9 +1751,16 @@ public enum FooBarEnum {
FOO,
//^^^ meta.constant.identifier.java entity.name.constant.java
// ^ punctuation.separator.comma.java
BAR;
@anno
BAR,
//^^^ meta.constant.identifier.java entity.name.constant.java
// ^ punctuation.terminator.java - meta.constant
// ^ punctuation.separator.comma.java
@anno
BAZ();
//^^^ meta.constant.identifier.java entity.name.constant.java
// ^ meta.constant.arguments.java meta.group.java punctuation.section.group.begin.java
// ^ meta.constant.arguments.java meta.group.java punctuation.section.group.end.java
// ^ punctuation.terminator.java - meta.constant
}
// <- meta.enum.java punctuation.section.block.end.java

Expand Down

0 comments on commit 3cda1fd

Please sign in to comment.