Debian Codegraph @

runtime/queries/bicep/highlights.scm

raw symbols SCIP
1 ; Includes
2 [
3 "import"
4 "provider"
5 "with"
6 "as"
7 "from"
8 ] @keyword.control.import
9
10 ; Namespaces
11 (module_declaration
12 (identifier) @namespace)
13
14 ; Builtins
15 (primitive_type) @type.builtin
16
17 ((member_expression
18 object: (identifier) @type.builtin)
19 (#eq? @type.builtin "sys"))
20
21 ; Functions
22 (call_expression
23 function: (identifier) @function)
24
25 (user_defined_function
26 name: (identifier) @function)
27
28 ; Properties
29 (object_property
30 (identifier) @function.method
31 ":" @punctuation.delimiter
32 (_))
33
34 (object_property
35 (compatible_identifier) @function.method
36 ":" @punctuation.delimiter
37 (_))
38
39 ; Property access `obj.field` is member access; the call rule below restores
40 ; @function.method for an invoked property like `az.resourceId(...)`.
41 (property_identifier) @variable.other.member
42
43 (call_expression
44 function: (member_expression
45 property: (property_identifier) @function.method))
46
47 ; Attributes
48 (decorator
49 "@" @attribute)
50
51 (decorator
52 (call_expression
53 (identifier) @attribute))
54
55 (decorator
56 (call_expression
57 (member_expression
58 object: (identifier) @attribute
59 property: (property_identifier) @attribute)))
60
61 ; Types
62 (type_declaration
63 (identifier) @type)
64
65 (type_declaration
66 (identifier)
67 "="
68 (identifier) @type)
69
70 (type
71 (identifier) @type)
72
73 (resource_declaration
74 (identifier) @type)
75
76 (resource_expression
77 (identifier) @type)
78
79 ; Parameters
80 (parameter_declaration
81 (identifier) @variable.parameter
82 (_))
83
84 (call_expression
85 function: (_)
86 (arguments
87 (identifier) @variable.parameter))
88
89 (call_expression
90 function: (_)
91 (arguments
92 (member_expression
93 object: (identifier) @variable.parameter)))
94
95 (parameter
96 .
97 (identifier) @variable.parameter)
98
99 ; Variables
100 (variable_declaration
101 (identifier) @variable
102 (_))
103
104 (metadata_declaration
105 (identifier) @variable
106 (_))
107
108 (output_declaration
109 (identifier) @variable
110 (_))
111
112 (object_property
113 (_)
114 ":"
115 (identifier) @variable)
116
117 (for_statement
118 "for"
119 (for_loop_parameters
120 (loop_variable) @variable
121 (loop_enumerator) @variable))
122
123 ; Conditionals
124 "if" @keyword.control.conditional
125
126 (ternary_expression
127 "?" @keyword.control.conditional
128 ":" @keyword.control.conditional)
129
130 ; Loops
131 (for_statement
132 "for" @keyword.control.repeat
133 "in"
134 ":" @punctuation.delimiter)
135
136 ; Keywords
137 [
138 "module"
139 "metadata"
140 "output"
141 "param"
142 "resource"
143 "existing"
144 "targetScope"
145 "type"
146 "var"
147 "using"
148 "test"
149 ] @keyword
150
151 "func" @keyword.function
152
153 "assert" @keyword.control.exception
154
155 ; Operators
156 [
157 "+"
158 "-"
159 "*"
160 "/"
161 "%"
162 "||"
163 "&&"
164 "|"
165 "=="
166 "!="
167 "=~"
168 "!~"
169 ">"
170 ">="
171 "<="
172 "<"
173 "??"
174 "="
175 "!"
176 ".?"
177 ] @operator
178
179 (subscript_expression
180 "?" @operator)
181
182 (nullable_type
183 "?" @operator)
184
185 "in" @keyword.operator
186
187 ; Literals
188 (string) @string
189
190 (escape_sequence) @constant.character
191
192 (number) @constant.numeric
193
194 (boolean) @constant.builtin.boolean
195
196 (null) @constant.builtin
197
198 ; Misc
199 (compatible_identifier
200 "?" @punctuation.special)
201
202 (nullable_return_type) @punctuation.special
203
204 [
205 "{"
206 "}"
207 ] @punctuation.bracket
208
209 [
210 "["
211 "]"
212 ] @punctuation.bracket
213
214 [
215 "("
216 ")"
217 ] @punctuation.bracket
218
219 [
220 "."
221 ":"
222 "::"
223 "=>"
224 ] @punctuation.delimiter
225
226 ; Interpolation
227 (interpolation
228 "${" @punctuation.special
229 "}" @punctuation.special)
230
231 (interpolation
232 (identifier) @variable)
233
234 ; Comments
235 [
236 (comment)
237 (diagnostic_comment)
238 ] @comment