Skip to content

Commit fa9a62c

Browse files
authored
enh(groovy) Add record and var keywords (#3872)
1 parent a1a1235 commit fa9a62c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Core Grammars:
4242
- enh(swift) macro attributes are highlighted as keywords [Bradley Mackey][]
4343
- enh(stan) updated for version 2.33 (#3859) [Brian Ward][]
4444
- fix(css) added '_' css variable detection [Md Saad Akhtar][]
45+
- enh(groovy) add `record` and `var` as keywords [Guillaume Laforge][]
4546

4647
Dev tool:
4748

@@ -66,6 +67,8 @@ Dev tool:
6667
[Yasith Deelaka]: https://github.com/YasithD
6768
[Brian Ward]: https://github.com/WardBrian
6869
[Md Saad Akhtar]: https://github.com/akhtarmdsaad
70+
[Guillaume Laforge]: https://github.com/glaforge
71+
6972

7073
## Version 11.8.0
7174

@@ -118,6 +121,7 @@ Core Grammars:
118121
[Cyrus Kao]: https://github.com/CyrusKao
119122
[Zlondrej]: https://github.com/zlondrej
120123

124+
121125
## Version 11.7.0
122126

123127
New Grammars:

src/languages/groovy.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default function(hljs) {
6666

6767
const CLASS_DEFINITION = {
6868
match: [
69-
/(class|interface|trait|enum|extends|implements)/,
69+
/(class|interface|trait|enum|record|extends|implements)/,
7070
/\s+/,
7171
hljs.UNDERSCORE_IDENT_RE
7272
],
@@ -126,7 +126,8 @@ export default function(hljs) {
126126
"import",
127127
"package",
128128
"return",
129-
"instanceof"
129+
"instanceof",
130+
"var"
130131
];
131132

132133
return {

0 commit comments

Comments
 (0)