Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add record and var keywords to Groovy syntax #3872

Merged
merged 4 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading