|
| 1 | +[ |
| 2 | + (quoted_argument) |
| 3 | + (bracket_argument) |
| 4 | +] @string |
| 5 | + |
| 6 | +(variable_ref) @none |
| 7 | +(variable) @variable |
| 8 | + |
| 9 | +[ |
| 10 | + (bracket_comment) |
| 11 | + (line_comment) |
| 12 | +] @comment |
| 13 | + |
| 14 | +(normal_command (identifier) @function) |
| 15 | + |
| 16 | +["ENV" "CACHE"] @symbol |
| 17 | +["$" "{" "}" "<" ">"] @punctuation.special |
| 18 | +["(" ")"] @punctuation.bracket |
| 19 | + |
| 20 | +[ |
| 21 | + (function) |
| 22 | + (endfunction) |
| 23 | + (macro) |
| 24 | + (endmacro) |
| 25 | +] @keyword.function |
| 26 | + |
| 27 | +[ |
| 28 | + (if) |
| 29 | + (elseif) |
| 30 | + (else) |
| 31 | + (endif) |
| 32 | +] @conditional |
| 33 | + |
| 34 | +[ |
| 35 | + (foreach) |
| 36 | + (endforeach) |
| 37 | + (while) |
| 38 | + (endwhile) |
| 39 | +] @repeat |
| 40 | + |
| 41 | +;; (function_command |
| 42 | +;; (function) |
| 43 | +;; . (argument) @function |
| 44 | +;; (argument)* @parameter |
| 45 | +;; ) |
| 46 | + |
| 47 | +;; (macro_command |
| 48 | +;; (macro) |
| 49 | +;; . (argument) @function.macro |
| 50 | +;; (argument)* @parameter |
| 51 | +;; ) |
| 52 | +;; |
| 53 | +;; (normal_command |
| 54 | +;; (identifier) @function.builtin |
| 55 | +;; . (argument) @variable |
| 56 | +;; (#match? @function.builtin "\\c^(set)$") |
| 57 | +;; ) |
| 58 | +;; |
| 59 | +;; (normal_command |
| 60 | +;; (identifier) @function.builtin |
| 61 | +;; (#match? @function.builtin "\\c^(set)$") |
| 62 | +;; ( |
| 63 | +;; (argument) @constant |
| 64 | +;; (#any-of? @constant "PARENT_SCOPE") |
| 65 | +;; ) . |
| 66 | +;; ) |
| 67 | +;; |
| 68 | +;; (normal_command |
| 69 | +;; (identifier) @function.builtin |
| 70 | +;; (#match? @function.builtin "\\c^(set)$") |
| 71 | +;; . (argument) |
| 72 | +;; ( |
| 73 | +;; (argument) @_cache @constant |
| 74 | +;; . |
| 75 | +;; (argument) @_type @constant |
| 76 | +;; (#any-of? @_cache "CACHE") |
| 77 | +;; (#any-of? @_type "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL") |
| 78 | +;; ) |
| 79 | +;; ) |
| 80 | +;; (normal_command |
| 81 | +;; (identifier) @function.builtin |
| 82 | +;; (#match? @function.builtin "\\c^(set)$") |
| 83 | +;; . (argument) |
| 84 | +;; (argument) @_cache |
| 85 | +;; (#any-of? @_cache "CACHE") |
| 86 | +;; ( |
| 87 | +;; (argument) @_force @constant |
| 88 | +;; (#any-of? @_force "FORCE") |
| 89 | +;; ) . |
| 90 | +;; ) |
| 91 | + |
| 92 | +;; ((argument) @boolean |
| 93 | +;; (#match? @boolean "\\c^(1|on|yes|true|y|0|off|no|false|n|ignore|notfound|.*-notfound)$") |
| 94 | +;; ) |
| 95 | +;; |
| 96 | +;; (if_command |
| 97 | +;; (if) |
| 98 | +;; (argument) @keyword.operator |
| 99 | +;; (#any-of? @keyword.operator "NOT" "AND" "OR" |
| 100 | +;; "COMMAND" "POLICY" "TARGET" "TEST" "DEFINED" "IN_LIST" |
| 101 | +;; "EXISTS" "IS_NEWER_THAN" "IS_DIRECTORY" "IS_SYMLINK" "IS_ABSOLUTE" |
| 102 | +;; "MATCHES" |
| 103 | +;; "LESS" "GREATER" "EQUAL" "LESS_EQUAL" "GREATER_EQUAL" |
| 104 | +;; "STRLESS" "STRGREATER" "STREQUAL" "STRLESS_EQUAL" "STRGREATER_EQUAL" |
| 105 | +;; "VERSION_LESS" "VERSION_GREATER" "VERSION_EQUAL" "VERSION_LESS_EQUAL" "VERSION_GREATER_EQUAL" |
| 106 | +;; ) |
| 107 | +;; ) |
| 108 | +;; |
| 109 | +;; (normal_command |
| 110 | +;; (identifier) @function.builtin |
| 111 | +;; . (argument) |
| 112 | +;; (argument) @constant |
| 113 | +;; (#any-of? @constant "ALL" "COMMAND" "DEPENDS" "BYPRODUCTS" "WORKING_DIRECTORY" "COMMENT" |
| 114 | +;; "JOB_POOL" "VERBATIM" "USES_TERMINAL" "COMMAND_EXPAND_LISTS" "SOURCES") |
| 115 | +;; (#match? @function.builtin "\\c^(add_custom_target)$") |
| 116 | +;; ) |
| 117 | +;; |
| 118 | +;; (normal_command |
| 119 | +;; (identifier) @function.builtin |
| 120 | +;; (argument) @constant |
| 121 | +;; (#any-of? @constant "OUTPUT" "COMMAND" "MAIN_DEPENDENCY" "DEPENDS" "BYPRODUCTS" "IMPLICIT_DEPENDS" "WORKING_DIRECTORY" |
| 122 | +;; "COMMENT" "DEPFILE" "JOB_POOL" "VERBATIM" "APPEND" "USES_TERMINAL" "COMMAND_EXPAND_LISTS") |
| 123 | +;; (#match? @function.builtin "\\c^(add_custom_command)$") |
| 124 | +;; ) |
| 125 | + |
| 126 | +(escape_sequence) @string.escape |
| 127 | + |
| 128 | +((source_file . (line_comment) @preproc) |
| 129 | + (#match? @preproc "^#!/")) |
0 commit comments