feat(groovy): Add more support for groovy syntax. Fix for groovy multiline comment highlighting.

This commit is contained in:
Bugala Piotr 2023-07-14 13:49:50 +02:00 committed by Amaan Qureshi
parent 51ea343f70
commit 7caa976154
3 changed files with 47 additions and 12 deletions

View file

@ -195,7 +195,7 @@
"revision": "5e66e961eee421786bdda8495ed1db045e06b5fe"
},
"groovy": {
"revision": "54c7da8b167261e76c79513c0364a01836093526"
"revision": "76e02db5866dd2b096512103ed4d8f630cc32980"
},
"hack": {
"revision": "95e63e79e0d9f91000bd11d458997fabed1bb1e2"

View file

@ -1,16 +1,16 @@
(unit
(identifier) @variable)
(identifier) @variable)
(string
(identifier) @variable)
(identifier) @variable)
(escape_sequence) @string.escape
(block
(unit
(identifier) @namespace))
(unit
(identifier) @namespace))
(func
(identifier) @function)
(identifier) @function)
(number) @number
@ -20,10 +20,20 @@
((identifier) @constant
(#lua-match? @constant "^[A-Z][A-Z%d_]*$"))
((identifier) @type.definition
(#any-of? @type.definition
"string"
((identifier) @constant.builtin
(#eq? @constant.builtin "null"))
((identifier) @type
(#any-of? @type
"String"
"Map"
"Object"
"Boolean"
"Integer"
"List"))
((identifier) @function.builtin
(#any-of? @function.builtin
"void"
"id"
"version"
@ -39,8 +49,28 @@
"class"
"def"
"import"
"package"
"assert"
"extends"
"implements"
"instanceof"
"interface"
"new"))
((identifier) @type.qualifier
(#any-of? @type.qualifier
"abstract"
"protected"
"private"
"public"))
((identifier) @exception
(#any-of? @exception
"throw"
"finally"
"try"
"catch"))
(string) @string
[
@ -57,7 +87,9 @@
((line_comment) @comment.documentation
(#lua-match? @comment.documentation "^///$"))
(operators) @operator
(leading_key) @operator
[
(operators)
(leading_key)
] @operator
["(" ")" "[" "]" "{" "}"] @punctuation.bracket

View file

@ -1 +1,4 @@
(comment) @comment
[
(block_comment)
(line_comment)
] @comment