2021-06-24 22:23:11 +02:00
|
|
|
[
|
2021-06-25 13:10:23 +02:00
|
|
|
(quoted_argument)
|
2021-06-27 22:23:15 +02:00
|
|
|
(bracket_argument)
|
2021-06-25 13:10:23 +02:00
|
|
|
] @string
|
2021-06-20 21:49:34 +02:00
|
|
|
|
2021-09-06 13:43:29 +02:00
|
|
|
(variable_ref) @none
|
|
|
|
|
(variable) @variable
|
2021-06-20 21:49:34 +02:00
|
|
|
|
2021-06-27 22:23:15 +02:00
|
|
|
[
|
|
|
|
|
(bracket_comment)
|
|
|
|
|
(line_comment)
|
2022-09-26 10:19:02 +01:00
|
|
|
] @comment @spell
|
2021-06-27 22:23:15 +02:00
|
|
|
|
2021-06-25 10:51:26 +02:00
|
|
|
(normal_command (identifier) @function)
|
2021-06-27 22:23:15 +02:00
|
|
|
|
2021-06-30 21:03:17 +02:00
|
|
|
["ENV" "CACHE"] @symbol
|
2021-07-06 19:52:20 +02:00
|
|
|
["$" "{" "}" "<" ">"] @punctuation.special
|
2021-06-30 21:03:17 +02:00
|
|
|
["(" ")"] @punctuation.bracket
|
|
|
|
|
|
2021-06-24 22:23:11 +02:00
|
|
|
[
|
2021-06-25 10:51:26 +02:00
|
|
|
(function)
|
|
|
|
|
(endfunction)
|
|
|
|
|
(macro)
|
|
|
|
|
(endmacro)
|
2021-09-06 11:20:00 +02:00
|
|
|
] @keyword.function
|
2021-06-24 22:23:11 +02:00
|
|
|
|
|
|
|
|
[
|
2021-06-25 10:51:26 +02:00
|
|
|
(if)
|
|
|
|
|
(elseif)
|
|
|
|
|
(else)
|
|
|
|
|
(endif)
|
2021-06-24 22:23:11 +02:00
|
|
|
] @conditional
|
|
|
|
|
|
|
|
|
|
[
|
2021-06-25 10:51:26 +02:00
|
|
|
(foreach)
|
|
|
|
|
(endforeach)
|
|
|
|
|
(while)
|
|
|
|
|
(endwhile)
|
2021-06-24 22:23:11 +02:00
|
|
|
] @repeat
|
2021-06-20 21:49:34 +02:00
|
|
|
|
2022-12-05 23:17:19 +01:00
|
|
|
(normal_command
|
|
|
|
|
(identifier) @repeat
|
|
|
|
|
(#match? @repeat "\\c^(continue|break)$")
|
|
|
|
|
)
|
|
|
|
|
(normal_command
|
|
|
|
|
(identifier) @keyword.return
|
|
|
|
|
(#match? @keyword.return "\\c^return$")
|
|
|
|
|
)
|
|
|
|
|
|
2021-09-08 22:55:52 +02:00
|
|
|
(function_command
|
|
|
|
|
(function)
|
|
|
|
|
. (argument) @function
|
|
|
|
|
(argument)* @parameter
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
(macro_command
|
|
|
|
|
(macro)
|
|
|
|
|
. (argument) @function.macro
|
|
|
|
|
(argument)* @parameter
|
|
|
|
|
)
|
|
|
|
|
|
2022-12-05 23:17:19 +01:00
|
|
|
(block_def
|
|
|
|
|
(block_command
|
|
|
|
|
(block) @function.builtin
|
|
|
|
|
(argument (unquoted_argument) @constant)
|
|
|
|
|
(#any-of? @constant "SCOPE_FOR" "POLICIES" "VARIABLES" "PROPAGATE")
|
|
|
|
|
)
|
|
|
|
|
(endblock_command (endblock) @function.builtin)
|
|
|
|
|
)
|
|
|
|
|
|
2021-09-09 22:01:56 +02:00
|
|
|
(normal_command
|
2022-02-05 00:13:08 +01:00
|
|
|
(identifier) @function.builtin
|
|
|
|
|
. (argument) @variable
|
|
|
|
|
(#match? @function.builtin "\\c^(set)$")
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(#match? @function.builtin "\\c^(set)$")
|
|
|
|
|
(
|
|
|
|
|
(argument) @constant
|
|
|
|
|
(#any-of? @constant "PARENT_SCOPE")
|
|
|
|
|
) .
|
|
|
|
|
)
|
2021-09-09 22:01:56 +02:00
|
|
|
|
|
|
|
|
(normal_command
|
2022-02-05 00:13:08 +01:00
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(#match? @function.builtin "\\c^(set)$")
|
|
|
|
|
. (argument)
|
|
|
|
|
(
|
2022-12-05 23:17:19 +01:00
|
|
|
(argument) @_cache @storageclass
|
2022-02-05 00:13:08 +01:00
|
|
|
.
|
2022-12-05 23:17:19 +01:00
|
|
|
(argument) @_type @type
|
2022-02-05 00:20:07 +01:00
|
|
|
(#any-of? @_cache "CACHE")
|
|
|
|
|
(#any-of? @_type "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL")
|
2022-02-05 00:13:08 +01:00
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(#match? @function.builtin "\\c^(set)$")
|
|
|
|
|
. (argument)
|
2022-02-05 00:20:07 +01:00
|
|
|
(argument) @_cache
|
|
|
|
|
(#any-of? @_cache "CACHE")
|
2022-02-05 00:13:08 +01:00
|
|
|
(
|
2022-02-05 00:20:07 +01:00
|
|
|
(argument) @_force @constant
|
|
|
|
|
(#any-of? @_force "FORCE")
|
2022-02-05 00:13:08 +01:00
|
|
|
) .
|
2021-09-09 22:01:56 +02:00
|
|
|
)
|
|
|
|
|
|
2022-12-07 22:34:28 +01:00
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(#match? @function.builtin "\\c^(unset)$")
|
|
|
|
|
. (argument) @variable
|
|
|
|
|
)
|
|
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(#match? @function.builtin "\\c^(unset)$")
|
|
|
|
|
. (argument)
|
|
|
|
|
(argument) @storageclass
|
|
|
|
|
(#any-of? @storageclass "CACHE" "PARENT_SCOPE")
|
|
|
|
|
)
|
|
|
|
|
|
2022-12-09 00:08:49 +01:00
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(#match? @function.builtin "\\c^(list)$")
|
|
|
|
|
. (argument) @constant
|
|
|
|
|
(#any-of? @constant "LENGTH" "GET" "JOIN" "SUBLIST" "FIND")
|
|
|
|
|
. (argument) @variable
|
|
|
|
|
(argument) @variable .
|
|
|
|
|
)
|
|
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(#match? @function.builtin "\\c^(list)$")
|
|
|
|
|
. (argument) @constant
|
|
|
|
|
. (argument) @variable
|
|
|
|
|
(#any-of? @constant "APPEND" "FILTER" "INSERT"
|
|
|
|
|
"POP_BACK" "POP_FRONT" "PREPEND"
|
|
|
|
|
"REMOVE_ITEM" "REMOVE_AT" "REMOVE_DUPLICATES"
|
|
|
|
|
"REVERSE" "SORT")
|
|
|
|
|
)
|
|
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(#match? @function.builtin "\\c^(list)$")
|
|
|
|
|
. (argument) @_transform @constant
|
|
|
|
|
. (argument) @variable
|
|
|
|
|
. (argument) @_action @constant
|
|
|
|
|
(#match? @_transform "TRANSFORM")
|
|
|
|
|
(#any-of? @_action "APPEND" "PREPEND" "TOUPPER" "TOLOWER" "STRIP" "GENEX_STRIP" "REPLACE")
|
|
|
|
|
)
|
|
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(#match? @function.builtin "\\c^(list)$")
|
|
|
|
|
. (argument) @_transform @constant
|
|
|
|
|
. (argument) @variable
|
|
|
|
|
. (argument) @_action @constant
|
|
|
|
|
. (argument)? @_selector @constant
|
|
|
|
|
(#match? @_transform "TRANSFORM")
|
|
|
|
|
(#any-of? @_action "APPEND" "PREPEND" "TOUPPER" "TOLOWER" "STRIP" "GENEX_STRIP" "REPLACE")
|
|
|
|
|
(#any-of? @_selector "AT" "FOR" "REGEX")
|
|
|
|
|
)
|
|
|
|
|
|
2021-09-10 18:42:23 +02:00
|
|
|
((argument) @boolean
|
|
|
|
|
(#match? @boolean "\\c^(1|on|yes|true|y|0|off|no|false|n|ignore|notfound|.*-notfound)$")
|
|
|
|
|
)
|
|
|
|
|
|
2021-09-10 15:19:10 +02:00
|
|
|
(if_command
|
|
|
|
|
(if)
|
|
|
|
|
(argument) @keyword.operator
|
|
|
|
|
(#any-of? @keyword.operator "NOT" "AND" "OR"
|
|
|
|
|
"COMMAND" "POLICY" "TARGET" "TEST" "DEFINED" "IN_LIST"
|
|
|
|
|
"EXISTS" "IS_NEWER_THAN" "IS_DIRECTORY" "IS_SYMLINK" "IS_ABSOLUTE"
|
|
|
|
|
"MATCHES"
|
|
|
|
|
"LESS" "GREATER" "EQUAL" "LESS_EQUAL" "GREATER_EQUAL"
|
|
|
|
|
"STRLESS" "STRGREATER" "STREQUAL" "STRLESS_EQUAL" "STRGREATER_EQUAL"
|
|
|
|
|
"VERSION_LESS" "VERSION_GREATER" "VERSION_EQUAL" "VERSION_LESS_EQUAL" "VERSION_GREATER_EQUAL"
|
|
|
|
|
)
|
|
|
|
|
)
|
2021-09-10 15:07:13 +02:00
|
|
|
|
|
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
. (argument)
|
|
|
|
|
(argument) @constant
|
|
|
|
|
(#any-of? @constant "ALL" "COMMAND" "DEPENDS" "BYPRODUCTS" "WORKING_DIRECTORY" "COMMENT"
|
|
|
|
|
"JOB_POOL" "VERBATIM" "USES_TERMINAL" "COMMAND_EXPAND_LISTS" "SOURCES")
|
|
|
|
|
(#match? @function.builtin "\\c^(add_custom_target)$")
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(argument) @constant
|
|
|
|
|
(#any-of? @constant "OUTPUT" "COMMAND" "MAIN_DEPENDENCY" "DEPENDS" "BYPRODUCTS" "IMPLICIT_DEPENDS" "WORKING_DIRECTORY"
|
|
|
|
|
"COMMENT" "DEPFILE" "JOB_POOL" "VERBATIM" "APPEND" "USES_TERMINAL" "COMMAND_EXPAND_LISTS")
|
|
|
|
|
(#match? @function.builtin "\\c^(add_custom_command)$")
|
|
|
|
|
)
|
|
|
|
|
|
2022-12-05 23:17:19 +01:00
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(#match? @function.builtin "\\c^include$")
|
|
|
|
|
(argument) @constant
|
|
|
|
|
(#any-of? @constant "OPTIONAL" "NO_POLICY_SCOPE")
|
|
|
|
|
)
|
|
|
|
|
(normal_command
|
|
|
|
|
(identifier) @function.builtin
|
|
|
|
|
(#match? @function.builtin "\\c^include$")
|
|
|
|
|
(argument) @constant
|
|
|
|
|
.
|
|
|
|
|
(argument) @variable
|
|
|
|
|
(#match? @constant "RESULT_VARIABLE")
|
|
|
|
|
)
|
|
|
|
|
|
2022-08-27 08:43:42 +08:00
|
|
|
(escape_sequence) @string.escape
|
2022-09-18 20:15:23 +03:00
|
|
|
|
|
|
|
|
((source_file . (line_comment) @preproc)
|
|
|
|
|
(#match? @preproc "^#!/"))
|