Skip to content

Commit

Permalink
Update groovy.xml (#807)
Browse files Browse the repository at this point in the history
Added var as an alternative to def
Now enum, trait, record, are types just like class and interface
  • Loading branch information
glaforge committed Aug 3, 2023
1 parent 555bb53 commit 95cec3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lexers/embedded/groovy.xml
Expand Up @@ -41,10 +41,10 @@
<rule pattern="(as|assert|break|case|catch|continue|default|do|else|finally|for|if|in|goto|instanceof|new|return|switch|this|throw|try|while|in|as)\b">
<token type="Keyword"/>
</rule>
<rule pattern="(abstract|const|enum|extends|final|implements|native|private|protected|public|static|strictfp|super|synchronized|throws|transient|volatile)\b">
<rule pattern="(abstract|const|extends|final|implements|native|private|protected|public|static|strictfp|super|synchronized|throws|transient|volatile)\b">
<token type="KeywordDeclaration"/>
</rule>
<rule pattern="(def|boolean|byte|char|double|float|int|long|short|void)\b">
<rule pattern="(def|var|boolean|byte|char|double|float|int|long|short|void)\b">
<token type="KeywordType"/>
</rule>
<rule pattern="(package)(\s+)">
Expand All @@ -56,7 +56,7 @@
<rule pattern="(true|false|null)\b">
<token type="KeywordConstant"/>
</rule>
<rule pattern="(class|interface|record)(\s+)">
<rule pattern="(class|interface|enum|trait|record)(\s+)">
<bygroups>
<token type="KeywordDeclaration"/>
<token type="Text"/>
Expand Down Expand Up @@ -132,4 +132,4 @@
</rule>
</state>
</rules>
</lexer>
</lexer>

0 comments on commit 95cec3b

Please sign in to comment.