fix(make/highlights): add define and operators

This commit is contained in:
Tyler Miller 2023-06-01 02:38:29 -07:00 committed by ObserverOfTime
parent 6847ce4f8c
commit 5ac8cf8ee5

View file

@ -37,18 +37,35 @@
(include_directive ["include" "-include"] @include)
(variable_assignment
(word) @symbol)
(variable_assignment [
"?="
":="
"+="
"="
name: (word) @symbol
[
"?="
":="
"::="
; ":::="
"+="
"="
] @operator)
(shell_assignment
name: (word) @symbol
"!=" @operator)
(define_directive
"define" @keyword
name: (word) @symbol
[
"="
":="
"::="
; ":::="
"?="
"!="
]? @operator
"endef" @keyword)
(variable_assignment
(word) @variable.builtin
(#any-of? @variable.builtin
(word) @variable.builtin (#any-of? @variable.builtin
".DEFAULT_GOAL"
".EXTRA_PREREQS"
".FEATURES"
@ -65,11 +82,9 @@
"SHELL"
))
; Use string to match bash
(variable_reference (word) @string) @operator
(shell_function
["$" "(" ")"] @operator
"shell" @function.builtin)