Skip to content

Commit

Permalink
fix: improve EEA syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed May 30, 2024
1 parent a5f0dde commit 9503b77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugin/syntaxes/eea/eea.example.eea
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ describeConstable
()Ljava/util/Optional<Ljava/lang/constant/ClassDesc;>;
()Ljava/util/Optional<Ljava/lang/constant/ClassDesc;>;
descriptorString
()Ljava/lang/String;
()Ljava/lang/String;
()Ljava/lang/String; // comment
()Ljava/lang/String; /* comment */
getAnnotatedInterfaces
()[Ljava/lang/reflect/AnnotatedType;
()[1L1java/lang/reflect/AnnotatedType;
Expand Down
11 changes: 8 additions & 3 deletions plugin/syntaxes/eea/eea.tmLanguage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ repository:
1: { name: entity.name.function.eea } # ([a-zA-Z_][a-zA-Z_\d]*)
3: { name: comment.line.eea }

# type reference
- match: (\[?)([01]?)(L)([01]?)(([a-zA-Z_$][a-zA-Z\d_$]*/)*[a-zA-Z_$][a-zA-Z\d_$]*)([;<])
# type reference in signature
- match: (\[?)([01]?)(L)([01]?)(([a-zA-Z_$][a-zA-Z\d_$]*/)*[a-zA-Z_$][a-zA-Z\d_$]*)
captures:
1: { name: punctuation.eea } # (\[?)
2: { name: constant.numeric.eea } # ([01]?)
Expand All @@ -46,6 +46,11 @@ repository:
7: { name: punctuation.eea } # ([;<])

# signature comment
- match: '[;DFIBVZ>]\s+(.+)$'
- match: '[;BDFIVZ>]\s+(.+)$'
captures:
1: { name: comment.line.eea }

# null annotations for generic types
- match: T([01])[a-zA-Z_$][a-zA-Z\d_$]*
captures:
1: { name: constant.numeric.eea }

0 comments on commit 9503b77

Please sign in to comment.