7814
Ta
tiny-c-agent / files
tiny-c-agent / vendor / queries / make / highlights.scm
2.5 KB
1(comment) @comment @spell 2 3(conditional 4 (_ 5 [ 6 "ifeq" 7 "else" 8 "ifneq" 9 "ifdef" 10 "ifndef" 11 ] @keyword.conditional) 12 "endif" @keyword.conditional) 13 14(rule 15 (targets 16 (word) @function)) 17 18(rule 19 (targets) @_target 20 (prerequisites 21 (word) @function 22 (#eq? @_target ".PHONY"))) 23 24(rule 25 (targets 26 (word) @function.builtin 27 (#any-of? @function.builtin 28 ".DEFAULT" ".SUFFIXES" ".DELETE_ON_ERROR" ".EXPORT_ALL_VARIABLES" ".IGNORE" ".INTERMEDIATE" 29 ".LOW_RESOLUTION_TIME" ".NOTPARALLEL" ".ONESHELL" ".PHONY" ".POSIX" ".PRECIOUS" ".SECONDARY" 30 ".SECONDEXPANSION" ".SILENT" ".SUFFIXES"))) 31 32(rule 33 [ 34 "&:" 35 ":" 36 "::" 37 "|" 38 ] @operator) 39 40[ 41 "export" 42 "unexport" 43] @keyword.import 44 45(override_directive 46 "override" @keyword) 47 48(include_directive 49 [ 50 "include" 51 "-include" 52 ] @keyword.import 53 filenames: (list 54 (word) @string.special.path)) 55 56(variable_assignment 57 name: (word) @string.special.symbol 58 [ 59 "?=" 60 ":=" 61 "::=" 62 ; ":::=" 63 "+=" 64 "=" 65 ] @operator) 66 67(shell_assignment 68 name: (word) @string.special.symbol 69 "!=" @operator) 70 71(define_directive 72 "define" @keyword 73 name: (word) @string.special.symbol 74 [ 75 "=" 76 ":=" 77 "::=" 78 ; ":::=" 79 "?=" 80 "!=" 81 ]? @operator 82 "endef" @keyword) 83 84(variable_assignment 85 (word) @variable.builtin 86 (#any-of? @variable.builtin 87 ".DEFAULT_GOAL" ".EXTRA_PREREQS" ".FEATURES" ".INCLUDE_DIRS" ".RECIPEPREFIX" ".SHELLFLAGS" 88 ".VARIABLES" "MAKEARGS" "MAKEFILE_LIST" "MAKEFLAGS" "MAKE_RESTARTS" "MAKE_TERMERR" 89 "MAKE_TERMOUT" "SHELL")) 90 91; Use string to match bash 92(variable_reference 93 (word) @string) @operator 94 95(shell_function 96 [ 97 "$" 98 "(" 99 ")" 100 ] @operator 101 "shell" @function.builtin) 102 103(function_call 104 [ 105 "$" 106 "(" 107 ")" 108 ] @operator) 109 110(substitution_reference 111 [ 112 "$" 113 "(" 114 ")" 115 ] @operator) 116 117(automatic_variable 118 "$" 119 _ @character.special 120 (#set! priority 105)) 121 122(automatic_variable 123 [ 124 "$" 125 "(" 126 ")" 127 ] @operator 128 (#set! priority 105)) 129 130(recipe_line 131 "@" @character.special) 132 133(function_call 134 [ 135 "subst" 136 "patsubst" 137 "strip" 138 "findstring" 139 "filter" 140 "filter-out" 141 "sort" 142 "word" 143 "words" 144 "wordlist" 145 "firstword" 146 "lastword" 147 "dir" 148 "notdir" 149 "suffix" 150 "basename" 151 "addsuffix" 152 "addprefix" 153 "join" 154 "wildcard" 155 "realpath" 156 "abspath" 157 "error" 158 "warning" 159 "info" 160 "origin" 161 "flavor" 162 "foreach" 163 "if" 164 "or" 165 "and" 166 "call" 167 "eval" 168 "file" 169 "value" 170 ] @function.builtin) 171 172"\\" @punctuation.special