Debian Codegraph @

runtime/queries/verilog/highlights.scm

raw symbols SCIP
1 ; Keywords
2
3 [
4 ; block delimiters
5 (module_keyword)
6 "endmodule"
7 "program"
8 "endprogram"
9 "class"
10 "endclass"
11 "interface"
12 "endinterface"
13 "package"
14 "endpackage"
15 "checker"
16 "endchecker"
17 "config"
18 "endconfig"
19
20 "pure"
21 "virtual"
22 "extends"
23 "implements"
24 "super"
25 (class_item_qualifier)
26
27 "parameter"
28 "localparam"
29 "defparam"
30 "assign"
31 "typedef"
32 "modport"
33 "fork"
34 "join"
35 "join_none"
36 "join_any"
37 "default"
38 "break"
39 "assert"
40 (unique_priority)
41 "tagged"
42 "extern"
43 ] @keyword
44
45 [
46 "function"
47 "endfunction"
48
49 "task"
50 "endtask"
51 ] @keyword.function
52
53 "return" @keyword.control.return
54
55 [
56 "begin"
57 "end"
58 ] @label
59
60 [
61 (always_keyword)
62 "generate"
63 "for"
64 "foreach"
65 "repeat"
66 "forever"
67 "initial"
68 "while"
69 ] @keyword.control
70
71 [
72 "if"
73 "else"
74 (case_keyword)
75 "endcase"
76 ] @keyword.control.conditional
77
78 (comment) @comment
79
80 (include_compiler_directive) @keyword.directive
81 (package_import_declaration
82 "import" @keyword.control.import)
83
84 (package_import_declaration
85 (package_import_item
86 (package_identifier
87 (simple_identifier) @constant)))
88
89 (text_macro_identifier
90 (simple_identifier) @keyword.directive)
91
92 (package_scope
93 (package_identifier
94 (simple_identifier) @constant))
95
96 (package_declaration
97 (package_identifier
98 (simple_identifier) @constant))
99
100 (parameter_port_list
101 "#" @constructor)
102
103 [
104 "="
105 "-"
106 "+"
107 "/"
108 "*"
109 "**"
110 "^"
111 "&"
112 "|"
113 "&&"
114 "||"
115 ":"
116 (unary_operator)
117 "{"
118 "}"
119 "'{"
120 "<="
121 "@"
122 "=="
123 "!="
124 "==="
125 "!=="
126 "-:"
127 "<"
128 ">"
129 ">="
130 "%"
131 ">>"
132 "<<"
133 ">>>"
134 "<<<"
135 "|="
136 (inc_or_dec_operator)
137 "?"
138 ] @operator
139 [
140 "or"
141 "and"
142 ] @keyword.operator
143
144 (cast
145 ["'" "(" ")"] @keyword.operator)
146
147 (edge_identifier) @constant
148
149 (port_direction) @label
150 (port_identifier
151 (simple_identifier) @variable)
152
153 (variable_port_header ("var") @type.builtin)
154 (data_declaration ("var") @type.builtin)
155 (tf_port_item1 ("var") @type.builtin)
156 [
157 (net_type)
158 (integer_vector_type)
159 (integer_atom_type)
160 ] @type.builtin
161
162 [
163 "signed"
164 "unsigned"
165 ] @label
166
167 (data_type
168 (simple_identifier) @type)
169
170 (method_call_body
171 (method_identifier) @variable.other.member)
172
173 (interface_identifier
174 (simple_identifier) @type)
175
176 (modport_identifier
177 (modport_identifier
178 (simple_identifier) @variable.other.member))
179
180 (net_port_type1
181 (simple_identifier) @type)
182
183 [
184 (double_quoted_string)
185 (string_literal)
186 ] @string
187
188 [
189 (include_compiler_directive)
190 (default_nettype_compiler_directive)
191 (timescale_compiler_directive)
192 ] @keyword.directive
193
194 ; begin/end label
195 (seq_block
196 (simple_identifier) @comment)
197
198 [
199 ";"
200 "::"
201 ","
202 "."
203 ] @punctuation.delimiter
204
205
206 (default_nettype_compiler_directive
207 (default_nettype_value) @string)
208
209 (text_macro_identifier
210 (simple_identifier) @function.macro)
211
212 (module_declaration
213 (module_header
214 (simple_identifier) @constructor))
215
216 (class_constructor_declaration
217 "new" @constructor)
218
219 (parameter_identifier
220 (simple_identifier) @variable.parameter)
221
222 [
223 (integral_number)
224 (unsigned_number)
225 (unbased_unsized_literal)
226 ] @constant.numeric
227
228 (time_unit) @constant
229
230 (checker_instantiation
231 (checker_identifier
232 (simple_identifier) @constructor))
233
234 (module_instantiation
235 (simple_identifier) @constructor)
236
237 (name_of_instance
238 (instance_identifier
239 (simple_identifier) @variable))
240
241 (interface_port_declaration
242 (interface_identifier
243 (simple_identifier) @type))
244
245 (net_declaration
246 (simple_identifier) @type)
247
248 (lifetime) @label
249
250 (function_identifier
251 (function_identifier
252 (simple_identifier) @function))
253
254 (function_subroutine_call
255 (subroutine_call
256 (tf_call
257 (simple_identifier) @function)))
258
259 (function_subroutine_call
260 (subroutine_call
261 (system_tf_call
262 (system_tf_identifier) @function.builtin)))
263
264 (task_identifier
265 (task_identifier
266 (simple_identifier) @function.method))
267
268 ;;TODO: fixme
269 ;(assignment_pattern_expression
270 ;(assignment_pattern
271 ;(parameter_identifier) @variable.other.member))
272
273 (type_declaration
274 (data_type ["packed"] @label))
275
276 (struct_union) @type
277
278 [
279 "enum"
280 ] @type
281
282 (enum_name_declaration
283 (enum_identifier
284 (simple_identifier) @constant))
285
286 (type_declaration
287 (simple_identifier) @type)
288
289 [
290 (integer_atom_type)
291 (non_integer_type)
292 "genvar"
293 ] @type.builtin
294
295 (struct_union_member
296 (list_of_variable_decl_assignments
297 (variable_decl_assignment
298 (simple_identifier) @variable.other.member)))
299
300 (member_identifier
301 (simple_identifier) @variable.other.member)
302
303 (struct_union_member
304 (data_type_or_void
305 (data_type
306 (simple_identifier) @type)))
307
308 (type_declaration
309 (simple_identifier) @type)
310
311 (generate_block_identifier) @comment
312
313 [
314 "["
315 "]"
316 "("
317 ")"
318 ] @punctuation.bracket