Skip to content

Commit

Permalink
enh(groovy) Add record and var keywords (#3872)
Browse files Browse the repository at this point in the history
  • Loading branch information
glaforge authored Oct 8, 2023
1 parent a1a1235 commit fa9a62c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Core Grammars:
- enh(swift) macro attributes are highlighted as keywords [Bradley Mackey][]
- enh(stan) updated for version 2.33 (#3859) [Brian Ward][]
- fix(css) added '_' css variable detection [Md Saad Akhtar][]
- enh(groovy) add `record` and `var` as keywords [Guillaume Laforge][]

Dev tool:

Expand All @@ -66,6 +67,8 @@ Dev tool:
[Yasith Deelaka]: https://github.com/YasithD
[Brian Ward]: https://github.com/WardBrian
[Md Saad Akhtar]: https://github.com/akhtarmdsaad
[Guillaume Laforge]: https://github.com/glaforge


## Version 11.8.0

Expand Down Expand Up @@ -118,6 +121,7 @@ Core Grammars:
[Cyrus Kao]: https://github.com/CyrusKao
[Zlondrej]: https://github.com/zlondrej


## Version 11.7.0

New Grammars:
Expand Down
5 changes: 3 additions & 2 deletions src/languages/groovy.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function(hljs) {

const CLASS_DEFINITION = {
match: [
/(class|interface|trait|enum|extends|implements)/,
/(class|interface|trait|enum|record|extends|implements)/,
/\s+/,
hljs.UNDERSCORE_IDENT_RE
],
Expand Down Expand Up @@ -126,7 +126,8 @@ export default function(hljs) {
"import",
"package",
"return",
"instanceof"
"instanceof",
"var"
];

return {
Expand Down

0 comments on commit fa9a62c

Please sign in to comment.