tm-grammars 1.6.7 → 1.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,705 +1,816 @@
1
1
  {
2
2
  "displayName": "SystemVerilog",
3
3
  "fileTypes": [
4
- "sv",
5
- "SV",
6
4
  "v",
7
- "V",
8
- "svh",
9
- "SVH",
10
5
  "vh",
11
- "VH"
6
+ "sv",
7
+ "svh"
12
8
  ],
13
9
  "name": "system-verilog",
14
10
  "patterns": [
15
11
  {
16
- "begin": "\\s*\\b(function|task)\\b(\\s+automatic)?",
17
- "beginCaptures": {
18
- "1": {
19
- "name": "keyword.control.systemverilog"
20
- },
21
- "2": {
22
- "name": "keyword.control.systemverilog"
23
- }
24
- },
25
- "end": ";",
26
- "name": "meta.function.systemverilog",
27
- "patterns": [
28
- {
29
- "captures": {
30
- "1": {
31
- "name": "storage.type.systemverilog"
32
- },
33
- "2": {
34
- "name": "entity.name.function.systemverilog"
35
- }
36
- },
37
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*\\s+)?([a-zA-Z_][a-zA-Z0-9_:]*)\\s*(?=\\(|;)"
38
- },
39
- {
40
- "include": "#port-dir"
41
- },
42
- {
43
- "include": "#base-grammar"
44
- }
45
- ]
12
+ "include": "#comments"
46
13
  },
47
14
  {
48
- "captures": {
49
- "1": {
50
- "name": "keyword.control.systemverilog"
51
- },
52
- "2": {
53
- "name": "keyword.control.systemverilog"
54
- },
55
- "3": {
56
- "name": "entity.name.function.systemverilog"
57
- }
58
- },
59
- "match": "\\s*\\b(task)\\s+(automatic)?\\s*(\\w+)\\s*;",
60
- "name": "meta.task.simple.systemverilog"
15
+ "include": "#strings"
61
16
  },
62
17
  {
63
- "begin": "\\s*\\b(typedef\\s+(struct|enum|union)\\b)\\s*(packed)?\\s*([a-zA-Z_][a-zA-Z0-9_]*)?",
64
- "beginCaptures": {
65
- "1": {
66
- "name": "keyword.control.systemverilog"
67
- },
68
- "2": {
69
- "name": "keyword.control.systemverilog"
70
- },
71
- "3": {
72
- "name": "keyword.control.systemverilog"
73
- },
74
- "4": {
75
- "name": "storage.type.systemverilog"
76
- }
77
- },
78
- "end": "(})\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*;",
79
- "endCaptures": {
80
- "1": {
81
- "name": "keyword.operator.other.systemverilog"
82
- },
83
- "2": {
84
- "name": "entity.name.function.systemverilog"
85
- }
86
- },
87
- "name": "meta.typedef.struct.systemverilog",
18
+ "include": "#typedef-enum-struct-union"
19
+ },
20
+ {
21
+ "include": "#typedef"
22
+ },
23
+ {
24
+ "include": "#functions"
25
+ },
26
+ {
27
+ "include": "#keywords"
28
+ },
29
+ {
30
+ "include": "#tables"
31
+ },
32
+ {
33
+ "include": "#function-task"
34
+ },
35
+ {
36
+ "include": "#module-declaration"
37
+ },
38
+ {
39
+ "include": "#class-declaration"
40
+ },
41
+ {
42
+ "include": "#enum-struct-union"
43
+ },
44
+ {
45
+ "include": "#sequence"
46
+ },
47
+ {
48
+ "include": "#all-types"
49
+ },
50
+ {
51
+ "include": "#module-parameters"
52
+ },
53
+ {
54
+ "include": "#module-no-parameters"
55
+ },
56
+ {
57
+ "include": "#port-net-parameter"
58
+ },
59
+ {
60
+ "include": "#system-tf"
61
+ },
62
+ {
63
+ "include": "#assertion"
64
+ },
65
+ {
66
+ "include": "#bind-directive"
67
+ },
68
+ {
69
+ "include": "#cast-operator"
70
+ },
71
+ {
72
+ "include": "#storage-scope"
73
+ },
74
+ {
75
+ "include": "#attributes"
76
+ },
77
+ {
78
+ "include": "#imports"
79
+ },
80
+ {
81
+ "include": "#operators"
82
+ },
83
+ {
84
+ "include": "#constants"
85
+ },
86
+ {
87
+ "include": "#identifiers"
88
+ },
89
+ {
90
+ "include": "#selects"
91
+ }
92
+ ],
93
+ "repository": {
94
+ "all-types": {
88
95
  "patterns": [
89
96
  {
90
- "include": "#struct-anonymous"
97
+ "include": "#built-ins"
91
98
  },
92
99
  {
93
- "include": "#base-grammar"
100
+ "include": "#modifiers"
94
101
  }
95
102
  ]
96
103
  },
97
- {
104
+ "assertion": {
98
105
  "captures": {
99
106
  "1": {
100
- "name": "keyword.control.systemverilog"
107
+ "name": "entity.name.goto-label.php"
101
108
  },
102
109
  "2": {
103
- "name": "entity.name.declaration.systemverilog"
110
+ "name": "keyword.operator.systemverilog"
111
+ },
112
+ "3": {
113
+ "name": "keyword.sva.systemverilog"
104
114
  }
105
115
  },
106
- "match": "\\s*\\b(typedef\\s+class)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*;",
107
- "name": "meta.typedef.class.systemverilog"
116
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_$]*)[ \\t\\r\\n]*(:)[ \\t\\r\\n]*(assert|assume|cover|restrict)\\b"
108
117
  },
109
- {
110
- "begin": "\\s*\\b(typedef)\\b",
118
+ "attributes": {
119
+ "begin": "(?<!@[ \\t\\r\\n]?)\\(\\*",
111
120
  "beginCaptures": {
112
- "1": {
113
- "name": "keyword.control.systemverilog"
121
+ "0": {
122
+ "name": "punctuation.attribute.rounds.begin"
114
123
  }
115
124
  },
116
- "end": "([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=(\\[[a-zA-Z0-9_:\\$\\-\\+]*\\])?;)",
125
+ "end": "\\*\\)",
117
126
  "endCaptures": {
118
- "1": {
119
- "name": "entity.name.function.systemverilog"
127
+ "0": {
128
+ "name": "punctuation.attribute.rounds.end"
120
129
  }
121
130
  },
122
- "name": "meta.typedef.simple.systemverilog",
131
+ "name": "meta.attribute.systemverilog",
123
132
  "patterns": [
124
133
  {
125
134
  "captures": {
126
135
  "1": {
127
- "name": "storage.type.userdefined.systemverilog"
136
+ "name": "keyword.control.systemverilog"
128
137
  },
129
138
  "2": {
130
- "name": "keyword.operator.param.systemverilog"
139
+ "name": "keyword.operator.assignment.systemverilog"
131
140
  }
132
141
  },
133
- "match": "\\b([a-zA-Z_]\\w*)\\s*(#)\\(",
134
- "name": "meta.typedef.class.systemverilog"
142
+ "match": "([a-zA-Z_][a-zA-Z0-9_$]*)(?:[ \\t\\r\\n]*(=)[ \\t\\r\\n]*)?"
135
143
  },
136
144
  {
137
- "include": "#base-grammar"
145
+ "include": "#constants"
138
146
  },
139
147
  {
140
- "include": "#module-binding"
148
+ "include": "#strings"
141
149
  }
142
150
  ]
143
151
  },
144
- {
145
- "begin": "\\s*(module)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
146
- "beginCaptures": {
147
- "1": {
148
- "name": "keyword.control.systemverilog"
149
- },
150
- "2": {
151
- "name": "entity.name.type.module.systemverilog"
152
- }
153
- },
154
- "end": ";",
155
- "endCaptures": {
156
- "1": {
157
- "name": "entity.name.function.systemverilog"
158
- }
159
- },
160
- "name": "meta.module.systemverilog",
152
+ "base-grammar": {
161
153
  "patterns": [
162
154
  {
163
- "include": "#port-dir"
155
+ "include": "#all-types"
164
156
  },
165
157
  {
166
- "match": "\\s*(parameter)",
167
- "name": "keyword.other.systemverilog"
158
+ "include": "#comments"
168
159
  },
169
160
  {
170
- "include": "#base-grammar"
161
+ "include": "#operators"
162
+ },
163
+ {
164
+ "include": "#constants"
165
+ },
166
+ {
167
+ "include": "#strings"
171
168
  },
172
169
  {
173
- "include": "#ifmodport"
170
+ "captures": {
171
+ "1": {
172
+ "name": "storage.type.interface.systemverilog"
173
+ }
174
+ },
175
+ "match": "[ \\t\\r\\n]*\\b([a-zA-Z_][a-zA-Z0-9_$]*)[ \\t\\r\\n]+[a-zA-Z_][a-zA-Z0-9_,= \\t\\n]*"
174
176
  },
175
177
  {
176
- "match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
177
- "name": "support.function.systemverilog"
178
+ "include": "#storage-scope"
178
179
  }
179
180
  ]
180
181
  },
181
- {
182
+ "bind-directive": {
182
183
  "captures": {
183
184
  "1": {
184
185
  "name": "keyword.control.systemverilog"
185
186
  },
186
187
  "2": {
187
- "name": "entity.name.function.systemverilog"
188
- }
189
- },
190
- "match": "\\b(sequence)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
191
- "name": "meta.sequence.systemverilog"
192
- },
193
- {
194
- "captures": {
195
- "1": {
196
- "name": "keyword.control.systemverilog"
188
+ "name": "entity.name.type.module.systemverilog"
197
189
  }
198
190
  },
199
- "match": "\\b(bind)\\s+([a-zA-Z_][a-zA-Z0-9_\\.]*)\\b"
191
+ "match": "[ \\t\\r\\n]*\\b(bind)[ \\t\\r\\n]+([a-zA-Z_][a-zA-Z0-9_$\\.]*)\\b",
192
+ "name": "meta.definition.systemverilog"
200
193
  },
201
- {
202
- "captures": {
203
- "0": {
204
- "name": "meta.section.begin.systemverilog"
194
+ "built-ins": {
195
+ "patterns": [
196
+ {
197
+ "match": "[ \\t\\r\\n]*\\b(bit|logic|reg)\\b",
198
+ "name": "storage.type.vector.systemverilog"
205
199
  },
206
- "1": {
207
- "name": "keyword.other.block.systemverilog"
200
+ {
201
+ "match": "[ \\t\\r\\n]*\\b(byte|shortint|int|longint|integer|time|genvar)\\b",
202
+ "name": "storage.type.atom.systemverilog"
208
203
  },
209
- "3": {
210
- "name": "keyword.operator.systemverilog"
204
+ {
205
+ "match": "[ \\t\\r\\n]*\\b(shortreal|real|realtime)\\b",
206
+ "name": "storage.type.notint.systemverilog"
211
207
  },
212
- "4": {
213
- "name": "entity.name.section.systemverilog"
214
- }
215
- },
216
- "match": "\\s*(begin|fork)\\s*((:)\\s*([a-zA-Z_][a-zA-Z0-9_]*))\\b",
217
- "name": "meta.definition.systemverilog"
218
- },
219
- {
220
- "captures": {
221
- "1": {
222
- "name": "keyword.sva.systemverilog"
208
+ {
209
+ "match": "[ \\t\\r\\n]*\\b(supply[01]|tri|triand|trior|trireg|tri[01]|uwire|wire|wand|wor)\\b",
210
+ "name": "storage.type.net.systemverilog"
223
211
  },
224
- "2": {
225
- "name": "entity.name.sva.systemverilog"
212
+ {
213
+ "match": "[ \\t\\r\\n]*\\b(genvar|var|void|signed|unsigned|string|const|process)\\b",
214
+ "name": "storage.type.built-in.systemverilog"
215
+ },
216
+ {
217
+ "match": "[ \\t\\r\\n]*\\b(uvm_(?:root|transaction|component|monitor|driver|test|env|object|agent|sequence_base|sequence_item|sequence_state|sequencer|sequencer_base|sequence|component_registry|analysis_imp|analysis_port|analysis_export|config_db|active_passive_enum|phase|verbosity|tlm_analysis_fifo|tlm_fifo|report_server|objection|recorder|domain|reg_field|reg_block|reg|bitstream_t|radix_enum|printer|packer|comparer|scope_stack))\\b",
218
+ "name": "storage.type.uvm.systemverilog"
226
219
  }
227
- },
228
- "match": "\\b(asset|cover)\\s(property)\\s+(\\w+)"
220
+ ]
229
221
  },
230
- {
222
+ "cast-operator": {
231
223
  "captures": {
232
224
  "1": {
233
- "name": "entity.name.sva.systemverilog"
225
+ "patterns": [
226
+ {
227
+ "include": "#built-ins"
228
+ },
229
+ {
230
+ "include": "#constants"
231
+ },
232
+ {
233
+ "match": "[a-zA-Z_][a-zA-Z0-9_$]*",
234
+ "name": "storage.type.user-defined.systemverilog"
235
+ }
236
+ ]
234
237
  },
235
238
  "2": {
236
- "name": "keyword.operator.systemverilog"
237
- },
238
- "3": {
239
- "name": "keyword.sva.systemverilog"
239
+ "name": "keyword.operator.cast.systemverilog"
240
240
  }
241
241
  },
242
- "match": "\\b(\\w+)\\s*(:)\\s*(assert)\\b"
242
+ "match": "[ \\t\\r\\n]*([0-9]+|[a-zA-Z_][a-zA-Z0-9_$]*)(')(?=\\()",
243
+ "name": "meta.cast.systemverilog"
243
244
  },
244
- {
245
- "begin": "\\s*(//)\\s*(psl)\\s+((\\w+)\\s*(:))?\\s*(default|assert|assume)",
245
+ "class-declaration": {
246
+ "begin": "[ \\t\\r\\n]*\\b(virtual[ \\t\\r\\n]+)?(class)(?:[ \\t\\r\\n]+(static|automatic))?[ \\t\\r\\n]+([a-zA-Z_][a-zA-Z0-9_$:]*)(?:[ \\t\\r\\n]+(extends|implements)[ \\t\\r\\n]+([a-zA-Z_][a-zA-Z0-9_$:]*))?",
246
247
  "beginCaptures": {
247
- "0": {
248
- "name": "meta.psl.systemverilog"
249
- },
250
248
  "1": {
251
- "name": "comment.line.double-slash.systemverilog"
249
+ "name": "storage.modifier.systemverilog"
252
250
  },
253
251
  "2": {
254
- "name": "keyword.psl.systemverilog"
252
+ "name": "storage.type.class.systemverilog"
253
+ },
254
+ "3": {
255
+ "name": "storage.modifier.systemverilog"
255
256
  },
256
257
  "4": {
257
- "name": "entity.psl.name.systemverilog"
258
+ "name": "entity.name.type.class.systemverilog"
258
259
  },
259
260
  "5": {
260
- "name": "keyword.operator.systemverilog"
261
+ "name": "keyword.control.systemverilog"
261
262
  },
262
263
  "6": {
263
- "name": "keyword.psl.systemverilog"
264
+ "name": "entity.name.type.class.systemverilog"
264
265
  }
265
266
  },
266
267
  "end": ";",
267
- "name": "meta.psl.systemverilog",
268
+ "endCaptures": {
269
+ "0": {
270
+ "name": "punctuation.definition.class.end.systemverilog"
271
+ }
272
+ },
273
+ "name": "meta.class.systemverilog",
268
274
  "patterns": [
269
275
  {
270
- "match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge)\\b",
271
- "name": "keyword.psl.systemverilog"
272
- },
273
- {
274
- "include": "#operators"
275
- },
276
- {
277
- "include": "#functions"
276
+ "captures": {
277
+ "1": {
278
+ "name": "keyword.control.systemverilog"
279
+ },
280
+ "2": {
281
+ "name": "entity.name.type.class.systemverilog"
282
+ },
283
+ "3": {
284
+ "name": "entity.name.type.class.systemverilog"
285
+ }
286
+ },
287
+ "match": "[ \\t\\r\\n]+\\b(extends|implements)[ \\t\\r\\n]+([a-zA-Z_][a-zA-Z0-9_$:]*)(?:[ \\t\\r\\n]*,[ \\t\\r\\n]*([a-zA-Z_][a-zA-Z0-9_$:]*))*"
278
288
  },
279
289
  {
280
- "include": "#constants"
290
+ "captures": {
291
+ "1": {
292
+ "name": "storage.type.userdefined.systemverilog"
293
+ },
294
+ "2": {
295
+ "name": "keyword.operator.param.systemverilog"
296
+ }
297
+ },
298
+ "match": "[ \\t\\r\\n]+\\b([a-zA-Z_][a-zA-Z0-9_$]*)[ \\t\\r\\n]*(#)\\(",
299
+ "name": "meta.typedef.class.systemverilog"
300
+ },
301
+ {
302
+ "include": "#port-net-parameter"
303
+ },
304
+ {
305
+ "include": "#base-grammar"
306
+ },
307
+ {
308
+ "include": "#module-binding"
309
+ },
310
+ {
311
+ "include": "#identifiers"
281
312
  }
282
313
  ]
283
314
  },
284
- {
285
- "begin": "\\s*(/\\*)\\s*(psl)",
286
- "beginCaptures": {
287
- "0": {
288
- "name": "meta.psl.systemverilog"
289
- },
290
- "1": {
291
- "name": "comment.block.systemverilog"
315
+ "comments": {
316
+ "patterns": [
317
+ {
318
+ "begin": "/\\*",
319
+ "beginCaptures": {
320
+ "0": {
321
+ "name": "punctuation.definition.comment.systemverilog"
322
+ }
323
+ },
324
+ "end": "\\*/",
325
+ "endCaptures": {
326
+ "0": {
327
+ "name": "punctuation.definition.comment.systemverilog"
328
+ }
329
+ },
330
+ "name": "comment.block.systemverilog",
331
+ "patterns": [
332
+ {
333
+ "include": "#fixme-todo"
334
+ }
335
+ ]
292
336
  },
293
- "2": {
294
- "name": "keyword.psl.systemverilog"
295
- }
296
- },
297
- "end": "(\\*/)",
298
- "endCaptures": {
299
- "1": {
300
- "name": "comment.block.systemverilog"
337
+ {
338
+ "begin": "//",
339
+ "beginCaptures": {
340
+ "0": {
341
+ "name": "punctuation.definition.comment.systemverilog"
342
+ }
343
+ },
344
+ "end": "$\\n?",
345
+ "name": "comment.line.double-slash.systemverilog",
346
+ "patterns": [
347
+ {
348
+ "include": "#fixme-todo"
349
+ }
350
+ ]
301
351
  }
302
- },
303
- "name": "meta.psl.systemverilog",
352
+ ]
353
+ },
354
+ "compiler-directives": {
355
+ "name": "meta.preprocessor.systemverilog",
304
356
  "patterns": [
305
357
  {
306
358
  "captures": {
307
- "0": {
308
- "name": "meta.psl.systemverilog"
359
+ "1": {
360
+ "name": "punctuation.definition.directive.systemverilog"
361
+ },
362
+ "2": {
363
+ "name": "string.regexp.systemverilog"
364
+ }
365
+ },
366
+ "match": "(`)(else|endif|endcelldefine|celldefine|nounconnected_drive|resetall|undefineall|end_keywords|__FILE__|__LINE__)\\b"
367
+ },
368
+ {
369
+ "captures": {
370
+ "1": {
371
+ "name": "punctuation.definition.directive.systemverilog"
309
372
  },
310
373
  "2": {
311
- "name": "entity.psl.name.systemverilog"
374
+ "name": "string.regexp.systemverilog"
312
375
  },
313
376
  "3": {
314
- "name": "keyword.operator.systemverilog"
377
+ "name": "variable.other.constant.preprocessor.systemverilog"
378
+ }
379
+ },
380
+ "match": "(`)(ifdef|ifndef|elsif|define|undef|pragma)[ \\t\\r\\n]+([a-zA-Z_][a-zA-Z0-9_$]*)\\b"
381
+ },
382
+ {
383
+ "captures": {
384
+ "1": {
385
+ "name": "punctuation.definition.directive.systemverilog"
315
386
  },
316
- "4": {
317
- "name": "keyword.psl.systemverilog"
387
+ "2": {
388
+ "name": "string.regexp.systemverilog"
389
+ }
390
+ },
391
+ "match": "(`)(include|timescale|default_nettype|unconnected_drive|line|begin_keywords)\\b"
392
+ },
393
+ {
394
+ "begin": "(`)(protected)\\b",
395
+ "beginCaptures": {
396
+ "1": {
397
+ "name": "punctuation.definition.directive.systemverilog"
398
+ },
399
+ "2": {
400
+ "name": "string.regexp.systemverilog"
401
+ }
402
+ },
403
+ "end": "(`)(endprotected)\\b",
404
+ "endCaptures": {
405
+ "1": {
406
+ "name": "punctuation.definition.directive.systemverilog"
407
+ },
408
+ "2": {
409
+ "name": "string.regexp.systemverilog"
318
410
  }
319
411
  },
320
- "match": "^\\s*((\\w+)\\s*(:))?\\s*(default|assert|assume)"
412
+ "name": "meta.crypto.systemverilog"
321
413
  },
322
414
  {
323
415
  "captures": {
324
416
  "1": {
325
- "name": "keyword.psl.systemverilog"
417
+ "name": "punctuation.definition.directive.systemverilog"
326
418
  },
327
419
  "2": {
328
- "name": "entity.psl.name.systemverilog"
420
+ "name": "variable.other.constant.preprocessor.systemverilog"
329
421
  }
330
422
  },
331
- "match": "\\b(asset|cover)\\s+(property)\\s+(\\w+)"
423
+ "match": "(`)([a-zA-Z_][a-zA-Z0-9_$]*)\\b"
424
+ }
425
+ ]
426
+ },
427
+ "constants": {
428
+ "patterns": [
429
+ {
430
+ "match": "(\\b[1-9][0-9_]*)?'([sS]?[bB][ \\t\\r\\n]*[0-1xXzZ?][0-1_xXzZ?]*|[sS]?[oO][ \\t\\r\\n]*[0-7xXzZ?][0-7_xXzZ?]*|[sS]?[dD][ \\t\\r\\n]*[0-9xXzZ?][0-9_xXzZ?]*|[sS]?[hH][ \\t\\r\\n]*[0-9a-fA-FxXzZ?][0-9a-fA-F_xXzZ?]*)((e|E)(\\+|-)?[0-9]+)?(?!'|\\w)",
431
+ "name": "constant.numeric.systemverilog"
332
432
  },
333
433
  {
334
- "match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge|negedge)\\b",
335
- "name": "keyword.psl.systemverilog"
434
+ "match": "'[01xXzZ]",
435
+ "name": "constant.numeric.bit.systemverilog"
336
436
  },
337
437
  {
338
- "include": "#operators"
438
+ "match": "\\b(?:\\d[\\d_\\.]*(?<!\\.)(?:e|E)(?:\\+|-)?[0-9]+)\\b",
439
+ "name": "constant.numeric.exp.systemverilog"
339
440
  },
340
441
  {
341
- "include": "#functions"
442
+ "match": "\\b(?:\\d[\\d_\\.]*(?!(?:[\\d\\.]|[ \\t\\r\\n]*(?:e|E|fs|ps|ns|us|ms|s))))\\b",
443
+ "name": "constant.numeric.decimal.systemverilog"
342
444
  },
343
445
  {
344
- "include": "#constants"
345
- }
346
- ]
347
- },
348
- {
349
- "captures": {
350
- "1": {
351
- "name": "keyword.other.systemverilog"
352
- }
353
- },
354
- "match": "\\s*\\b(automatic|cell|config|deassign|defparam|design|disable|edge|endconfig|endgenerate|endspecify|endtable|event|generate|genvar|ifnone|incdir|instance|liblist|library|macromodule|negedge|noshowcancelled|posedge|pulsestyle_onevent|pulsestyle_ondetect|scalared|showcancelled|specify|specparam|table|use|vectored)\\b"
355
- },
356
- {
357
- "captures": {
358
- "1": {
359
- "name": "keyword.control.systemverilog"
360
- }
361
- },
362
- "match": "\\s*\\b(initial|always|wait|force|release|assign|always_comb|always_ff|always_latch|forever|repeat|while|for|if|iff|else|case|casex|casez|default|endcase|return|break|continue|do|foreach|with|inside|dist|clocking|cover|coverpoint|property|bins|binsof|illegal_bins|ignore_bins|randcase|modport|matches|solve|static|assert|assume|before|expect|cross|ref|first_match|srandom|struct|packed|final|chandle|alias|tagged|extern|throughout|timeprecision|timeunit|priority|type|union|uwire|wait_order|triggered|randsequence|import|export|context|pure|intersect|wildcard|within|new|typedef|enum|this|super|begin|fork|forkjoin|unique|unique0|priority)\\b"
363
- },
364
- {
365
- "captures": {
366
- "1": {
367
- "name": "keyword.control.systemverilog"
446
+ "match": "\\b(?:\\d[\\d\\.]*[ \\t\\r\\n]*(?:fs|ps|ns|us|ms|s))\\b",
447
+ "name": "constant.numeric.time.systemverilog"
368
448
  },
369
- "3": {
370
- "name": "keyword.operator.systemverilog"
449
+ {
450
+ "include": "#compiler-directives"
371
451
  },
372
- "4": {
373
- "name": "entity.label.systemverilog"
374
- }
375
- },
376
- "match": "\\s*\\b(end|endtask|endmodule|endfunction|endprimitive|endclass|endpackage|endsequence|endprogram|endclocking|endproperty|endgroup|endinterface|join|join_any|join_none)\\b(\\s*(:)\\s*(\\w+))?",
377
- "name": "meta.object.end.systemverilog"
378
- },
379
- {
380
- "match": "\\b(std)\\b::",
381
- "name": "support.class.systemverilog"
382
- },
383
- {
384
- "captures": {
385
- "1": {
386
- "name": "constant.other.define.systemverilog"
452
+ {
453
+ "match": "\\b(?:this|super|null)\\b",
454
+ "name": "constant.language.systemverilog"
387
455
  },
388
- "2": {
389
- "name": "entity.name.type.define.systemverilog"
390
- }
391
- },
392
- "match": "^\\s*(`define)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
393
- "name": "meta.define.systemverilog"
394
- },
395
- {
396
- "captures": {
397
- "1": {
398
- "name": "constant.other.undef.systemverilog"
456
+ {
457
+ "match": "\\b([A-Z][A-Z0-9_]*)\\b",
458
+ "name": "constant.other.net.systemverilog"
399
459
  },
400
- "2": {
401
- "name": "entity.name.type.undef.systemverilog"
460
+ {
461
+ "match": "\\b(?<!\\.)([A-Z0-9_]+)(?!\\.)\\b",
462
+ "name": "constant.numeric.parameter.uppercase.systemverilog"
463
+ },
464
+ {
465
+ "match": "\\.\\*",
466
+ "name": "keyword.operator.quantifier.regexp"
402
467
  }
403
- },
404
- "match": "^\\s*(`undef)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
405
- "name": "meta.undef.systemverilog"
406
- },
407
- {
408
- "include": "#comments"
468
+ ]
409
469
  },
410
- {
411
- "captures": {
470
+ "enum-struct-union": {
471
+ "begin": "[ \\t\\r\\n]*\\b(enum|struct|union(?:[ \\t\\r\\n]+tagged)?|class|interface[ \\t\\r\\n]+class)(?:[ \\t\\r\\n]+(?!packed|signed|unsigned)([a-zA-Z_][a-zA-Z0-9_$]*)?(?:[ \\t\\r\\n]*(\\[[a-zA-Z0-9_:$\\.\\-\\+\\*/%`' \\t\\r\\n\\[\\]\\(\\)]*\\])?))?(?:[ \\t\\r\\n]+(packed))?(?:[ \\t\\r\\n]+(signed|unsigned))?(?=[ \\t\\r\\n]*(?:{|$))",
472
+ "beginCaptures": {
412
473
  "1": {
413
474
  "name": "keyword.control.systemverilog"
414
475
  },
415
476
  "2": {
416
- "name": "entity.name.type.class.systemverilog"
417
- }
418
- },
419
- "match": "\\s*(primitive|package|constraint|interface|covergroup|program)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
420
- "name": "meta.definition.systemverilog"
421
- },
422
- {
423
- "captures": {
424
- "2": {
425
- "name": "entity.name.type.class.systemverilog"
477
+ "patterns": [
478
+ {
479
+ "include": "#built-ins"
480
+ }
481
+ ]
426
482
  },
427
483
  "3": {
428
- "name": "keyword.operator.other.systemverilog"
484
+ "patterns": [
485
+ {
486
+ "include": "#selects"
487
+ }
488
+ ]
429
489
  },
430
490
  "4": {
431
- "name": "keyword.control.systemverilog"
491
+ "name": "storage.modifier.systemverilog"
492
+ },
493
+ "5": {
494
+ "name": "storage.modifier.systemverilog"
432
495
  }
433
496
  },
434
- "match": "(([a-zA-Z_][a-zA-Z0-9_]*)\\s*(:))?\\s*(coverpoint|cross)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
435
- "name": "meta.definition.systemverilog"
436
- },
437
- {
438
- "captures": {
497
+ "end": "(?<=})[ \\t\\r\\n]*([a-zA-Z_][a-zA-Z0-9_$]*|(?<=^|[ \\t\\r\\n])\\\\[!-~]+(?=$|[ \\t\\r\\n]))(?:[ \\t\\r\\n]*(\\[[a-zA-Z0-9_:$\\.\\-\\+\\*/%`' \\t\\r\\n\\[\\]\\(\\)]*\\])?)[ \\t\\r\\n]*[,;]",
498
+ "endCaptures": {
439
499
  "1": {
440
- "name": "keyword.control.systemverilog"
500
+ "patterns": [
501
+ {
502
+ "include": "#identifiers"
503
+ }
504
+ ]
441
505
  },
442
506
  "2": {
443
- "name": "keyword.control.systemverilog"
444
- },
445
- "3": {
446
- "name": "entity.name.type.class.systemverilog"
507
+ "patterns": [
508
+ {
509
+ "include": "#selects"
510
+ }
511
+ ]
447
512
  }
448
513
  },
449
- "match": "\\b(virtual\\s+)?(class)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
450
- "name": "meta.definition.class.systemverilog"
451
- },
452
- {
453
- "captures": {
454
- "1": {
455
- "name": "keyword.control.systemverilog"
514
+ "name": "meta.enum-struct-union.systemverilog",
515
+ "patterns": [
516
+ {
517
+ "include": "#keywords"
456
518
  },
457
- "2": {
458
- "name": "entity.other.inherited-class.systemverilog"
519
+ {
520
+ "include": "#base-grammar"
521
+ },
522
+ {
523
+ "include": "#identifiers"
459
524
  }
460
- },
461
- "match": "\\b(extends)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b",
462
- "name": "meta.definition.systemverilog"
463
- },
464
- {
465
- "include": "#all-types"
466
- },
467
- {
468
- "include": "#operators"
469
- },
470
- {
471
- "include": "#port-dir"
472
- },
473
- {
474
- "match": "\\b(and|nand|nor|or|xor|xnor|buf|not|bufif[01]|notif[01]|r?[npc]mos|tran|r?tranif[01]|pullup|pulldown)\\b",
475
- "name": "support.type.systemverilog"
476
- },
477
- {
478
- "include": "#strings"
479
- },
480
- {
481
- "match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
482
- "name": "support.function.systemverilog"
525
+ ]
483
526
  },
484
- {
485
- "captures": {
486
- "1": {
487
- "name": "storage.type.systemverilog"
527
+ "fixme-todo": {
528
+ "patterns": [
529
+ {
530
+ "match": "(?i:fixme)",
531
+ "name": "invalid.broken.fixme.systemverilog"
488
532
  },
489
- "2": {
490
- "name": "keyword.operator.cast.systemverilog"
533
+ {
534
+ "match": "(?i:todo)",
535
+ "name": "invalid.unimplemented.todo.systemverilog"
491
536
  }
492
- },
493
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(')(?=\\()",
494
- "name": "meta.cast.systemverilog"
537
+ ]
495
538
  },
496
- {
497
- "captures": {
539
+ "function-task": {
540
+ "begin": "[ \\t\\r\\n]*(?:\\b(virtual)[ \\t\\r\\n]+)?(?:\\b(function|task)\\b)(?:[ \\t\\r\\n]+\\b(static|automatic)\\b)?",
541
+ "beginCaptures": {
498
542
  "1": {
499
- "name": "keyword.other.systemverilog"
543
+ "name": "storage.modifier.systemverilog"
500
544
  },
501
545
  "2": {
502
- "name": "constant.other.systemverilog"
546
+ "name": "storage.type.function.systemverilog"
547
+ },
548
+ "3": {
549
+ "name": "storage.modifier.systemverilog"
503
550
  }
504
551
  },
505
- "match": "^\\s*(localparam|parameter)\\s+([A-Z_][A-Z0-9_]*)\\b\\s*(?=(=))",
506
- "name": "meta.param.systemverilog"
507
- },
508
- {
509
- "captures": {
510
- "1": {
511
- "name": "keyword.other.systemverilog"
552
+ "end": ";",
553
+ "endCaptures": {
554
+ "0": {
555
+ "name": "punctuation.definition.function.end.systemverilog"
512
556
  }
513
557
  },
514
- "match": "^\\s*(localparam|parameter)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=(=))",
515
- "name": "meta.param.systemverilog"
516
- },
517
- {
518
- "captures": {
519
- "1": {
520
- "name": "keyword.other.systemverilog"
521
- },
522
- "2": {
523
- "name": "keyword.other.systemverilog"
558
+ "name": "meta.function.systemverilog",
559
+ "patterns": [
560
+ {
561
+ "captures": {
562
+ "1": {
563
+ "name": "support.type.scope.systemverilog"
564
+ },
565
+ "2": {
566
+ "name": "keyword.operator.scope.systemverilog"
567
+ },
568
+ "3": {
569
+ "patterns": [
570
+ {
571
+ "include": "#built-ins"
572
+ },
573
+ {
574
+ "match": "[a-zA-Z_][a-zA-Z0-9_$]*",
575
+ "name": "storage.type.user-defined.systemverilog"
576
+ }
577
+ ]
578
+ },
579
+ "4": {
580
+ "patterns": [
581
+ {
582
+ "include": "#modifiers"
583
+ }
584
+ ]
585
+ },
586
+ "5": {
587
+ "patterns": [
588
+ {
589
+ "include": "#selects"
590
+ }
591
+ ]
592
+ },
593
+ "6": {
594
+ "name": "entity.name.function.systemverilog"
595
+ }
596
+ },
597
+ "match": "[ \\t\\r\\n]*(?:\\b([a-zA-Z_][a-zA-Z0-9_$]*)(::))?([a-zA-Z_][a-zA-Z0-9_$]*\\b[ \\t\\r\\n]+)?(?:\\b(signed|unsigned)\\b[ \\t\\r\\n]*)?(?:(\\[[a-zA-Z0-9_:$\\.\\-\\+\\*/%`' \\t\\r\\n\\[\\]\\(\\)]*\\])[ \\t\\r\\n]*)?(?:\\b([a-zA-Z_][a-zA-Z0-9_$]*)\\b[ \\t\\r\\n]*)(?=\\(|;)"
524
598
  },
525
- "3": {
526
- "name": "storage.type.rand.systemverilog"
599
+ {
600
+ "include": "#keywords"
527
601
  },
528
- "5": {
529
- "name": "support.type.scope.systemverilog"
602
+ {
603
+ "include": "#port-net-parameter"
530
604
  },
531
- "6": {
532
- "name": "keyword.operator.scope.systemverilog"
605
+ {
606
+ "include": "#base-grammar"
533
607
  },
534
- "7": {
535
- "name": "storage.type.userdefined.systemverilog"
608
+ {
609
+ "include": "#identifiers"
536
610
  }
537
- },
538
- "match": "^\\s*(local\\s+|protected\\s+|localparam\\s+|parameter\\s+)?(const\\s+|virtual\\s+)?(rand\\s+|randc\\s+)?(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=(#\\s*\\([\\w,]+\\)\\s*)?([a-zA-Z][a-zA-Z0-9_\\s\\[\\]']*)(;|,|=|'\\{))",
539
- "name": "meta.userdefined.systemverilog"
611
+ ]
540
612
  },
541
- {
542
- "captures": {
543
- "1": {
544
- "name": "keyword.cover.systemverilog"
545
- }
546
- },
547
- "match": "\\s*\\b(option)\\."
613
+ "functions": {
614
+ "match": "[ \\t\\r\\n]*\\b(?!while|for|if|iff|else|case|casex|casez)([a-zA-Z_][a-zA-Z0-9_$]*)(?=[ \\t\\r\\n]*\\()",
615
+ "name": "entity.name.function.systemverilog"
548
616
  },
549
- {
550
- "captures": {
551
- "1": {
552
- "name": "keyword.other.systemverilog"
617
+ "identifiers": {
618
+ "patterns": [
619
+ {
620
+ "match": "\\b[a-zA-Z_][a-zA-Z0-9_$]*\\b",
621
+ "name": "variable.other.identifier.systemverilog"
622
+ },
623
+ {
624
+ "match": "(?<=^|[ \\t\\r\\n])\\\\[!-~]+(?=$|[ \\t\\r\\n])",
625
+ "name": "string.regexp.identifier.systemverilog"
553
626
  }
554
- },
555
- "match": "\\s*\\b(local|const|protected|virtual|localparam|parameter)\\b"
556
- },
557
- {
558
- "match": "\\s*\\b(rand|randc)\\b",
559
- "name": "storage.type.rand.systemverilog"
627
+ ]
560
628
  },
561
- {
562
- "begin": "^(\\s*(bind)\\s+([a-zA-Z_][\\w\\.]*))?\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=#[^#])",
563
- "beginCaptures": {
564
- "2": {
629
+ "imports": {
630
+ "captures": {
631
+ "1": {
565
632
  "name": "keyword.control.systemverilog"
566
633
  },
634
+ "2": {
635
+ "name": "support.type.scope.systemverilog"
636
+ },
637
+ "3": {
638
+ "name": "keyword.operator.scope.systemverilog"
639
+ },
567
640
  "4": {
568
- "name": "storage.module.systemverilog"
641
+ "patterns": [
642
+ {
643
+ "include": "#operators"
644
+ },
645
+ {
646
+ "include": "#identifiers"
647
+ }
648
+ ]
569
649
  }
570
650
  },
571
- "end": "(?=;|=|:)",
572
- "name": "meta.module.inst.param.systemverilog",
651
+ "match": "[ \\t\\r\\n]*\\b(import|export)[ \\t\\r\\n]+([a-zA-Z_][a-zA-Z0-9_$]*|\\*)[ \\t\\r\\n]*(::)[ \\t\\r\\n]*([a-zA-Z_][a-zA-Z0-9_$]*|\\*)[ \\t\\r\\n]*(,|;)",
652
+ "name": "meta.import.systemverilog"
653
+ },
654
+ "keywords": {
573
655
  "patterns": [
574
656
  {
575
- "include": "#module-binding"
657
+ "captures": {
658
+ "1": {
659
+ "name": "keyword.other.systemverilog"
660
+ }
661
+ },
662
+ "match": "[ \\t\\r\\n]*\\b(edge|negedge|posedge|cell|config|defparam|design|disable|endgenerate|endspecify|event|generate|ifnone|incdir|instance|liblist|library|noshowcancelled|pulsestyle_onevent|pulsestyle_ondetect|scalared|showcancelled|specify|specparam|use|vectored)\\b"
576
663
  },
577
664
  {
578
- "include": "#module-param"
665
+ "include": "#sv-control"
579
666
  },
580
667
  {
581
- "include": "#comments"
668
+ "include": "#sv-control-begin"
582
669
  },
583
670
  {
584
- "include": "#operators"
671
+ "include": "#sv-control-end"
585
672
  },
586
673
  {
587
- "include": "#constants"
674
+ "include": "#sv-definition"
588
675
  },
589
676
  {
590
- "include": "#strings"
677
+ "include": "#sv-cover-cross"
591
678
  },
592
679
  {
593
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(\\(|$))",
594
- "name": "entity.name.type.module.systemverilog"
680
+ "include": "#sv-std"
681
+ },
682
+ {
683
+ "include": "#sv-option"
684
+ },
685
+ {
686
+ "include": "#sv-local"
687
+ },
688
+ {
689
+ "include": "#sv-rand"
595
690
  }
596
691
  ]
597
692
  },
598
- {
599
- "begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s+(?!intersect|and|or|throughout|within)([a-zA-Z_][a-zA-Z0-9_]*)\\s*(\\[(\\d+)(\\:(\\d+))?\\])?\\s*(\\(|$)",
693
+ "modifiers": {
694
+ "match": "[ \\t\\r\\n]*\\b(?:(?:un)?signed|packed|small|medium|large|supply[01]|strong[01]|pull[01]|weak[01]|highz[01])\\b",
695
+ "name": "storage.modifier.systemverilog"
696
+ },
697
+ "module-binding": {
698
+ "begin": "\\.([a-zA-Z_][a-zA-Z0-9_$]*)[ \\t\\r\\n]*\\(",
600
699
  "beginCaptures": {
601
700
  "1": {
602
- "name": "storage.module.systemverilog"
603
- },
604
- "2": {
605
- "name": "entity.name.type.module.systemverilog"
606
- },
607
- "4": {
608
- "name": "constant.numeric.systemverilog"
609
- },
610
- "6": {
611
- "name": "constant.numeric.systemverilog"
701
+ "name": "support.function.port.systemverilog"
612
702
  }
613
703
  },
614
- "end": ";",
615
- "name": "meta.module.inst.systemverilog",
704
+ "end": "\\),?",
705
+ "name": "meta.port.binding.systemverilog",
616
706
  "patterns": [
617
707
  {
618
- "include": "#module-binding"
708
+ "include": "#constants"
619
709
  },
620
710
  {
621
711
  "include": "#comments"
622
712
  },
623
713
  {
624
- "include": "#strings"
714
+ "include": "#operators"
625
715
  },
626
716
  {
627
- "include": "#operators"
717
+ "include": "#strings"
628
718
  },
629
719
  {
630
720
  "include": "#constants"
721
+ },
722
+ {
723
+ "include": "#storage-scope"
724
+ },
725
+ {
726
+ "include": "#cast-operator"
727
+ },
728
+ {
729
+ "include": "#system-tf"
730
+ },
731
+ {
732
+ "match": "\\bvirtual\\b",
733
+ "name": "storage.modifier.systemverilog"
734
+ },
735
+ {
736
+ "include": "#identifiers"
631
737
  }
632
738
  ]
633
739
  },
634
- {
635
- "begin": "\\b\\s+(<?=)\\s*(\\'{)",
740
+ "module-declaration": {
741
+ "begin": "[ \\t\\r\\n]*\\b((?:macro)?module|interface|program|package|modport)[ \\t\\r\\n]+(?:(static|automatic)[ \\t\\r\\n]+)?([a-zA-Z_][a-zA-Z0-9_$]*)\\b",
636
742
  "beginCaptures": {
637
743
  "1": {
638
- "name": "keyword.operator.other.systemverilog"
744
+ "name": "keyword.control.systemverilog"
639
745
  },
640
746
  "2": {
641
- "name": "keyword.operator.other.systemverilog"
747
+ "name": "storage.modifier.systemverilog"
642
748
  },
643
749
  "3": {
644
- "name": "keyword.operator.other.systemverilog"
750
+ "name": "entity.name.type.module.systemverilog"
645
751
  }
646
752
  },
647
753
  "end": ";",
648
- "name": "meta.struct.assign.systemverilog",
754
+ "endCaptures": {
755
+ "0": {
756
+ "name": "punctuation.definition.module.end.systemverilog"
757
+ }
758
+ },
759
+ "name": "meta.module.systemverilog",
649
760
  "patterns": [
650
761
  {
651
- "captures": {
652
- "1": {
653
- "name": "support.function.field.systemverilog"
654
- },
655
- "2": {
656
- "name": "keyword.operator.other.systemverilog"
657
- }
658
- },
659
- "match": "\\b(\\w+)\\s*(:)(?!:)"
762
+ "include": "#parameters"
660
763
  },
661
764
  {
662
- "include": "#comments"
765
+ "include": "#port-net-parameter"
663
766
  },
664
767
  {
665
- "include": "#strings"
768
+ "include": "#imports"
666
769
  },
667
770
  {
668
- "include": "#operators"
771
+ "include": "#base-grammar"
669
772
  },
670
773
  {
671
- "include": "#constants"
774
+ "include": "#system-tf"
672
775
  },
673
776
  {
674
- "include": "#storage-scope-systemverilog"
777
+ "include": "#identifiers"
675
778
  }
676
779
  ]
677
780
  },
678
- {
679
- "include": "#storage-scope-systemverilog"
680
- },
681
- {
682
- "include": "#functions"
683
- },
684
- {
685
- "include": "#constants"
686
- }
687
- ],
688
- "repository": {
689
- "all-types": {
690
- "patterns": [
691
- {
692
- "include": "#storage-type-systemverilog"
781
+ "module-no-parameters": {
782
+ "begin": "[ \\t\\r\\n]*\\b(?:(bind|pullup|pulldown)[ \\t\\r\\n]+(?:([a-zA-Z_][a-zA-Z0-9_$\\.]*)[ \\t\\r\\n]+)?)?((?:\\b(?:and|nand|or|nor|xor|xnor|buf|not|bufif[01]|notif[01]|r?[npc]mos|r?tran|r?tranif[01])\\b|[a-zA-Z_][a-zA-Z0-9_$]*))[ \\t\\r\\n]+(?!intersect|and|or|throughout|within)([a-zA-Z_][a-zA-Z0-9_$]*)(?:[ \\t\\r\\n]*(\\[[a-zA-Z0-9_:$\\.\\-\\+\\*/%`' \\t\\r\\n\\[\\]\\(\\)]*\\])?)[ \\t\\r\\n]*(?=\\(|$)(?!;)",
783
+ "beginCaptures": {
784
+ "1": {
785
+ "name": "keyword.control.systemverilog"
693
786
  },
694
- {
695
- "include": "#storage-modifier-systemverilog"
787
+ "2": {
788
+ "name": "entity.name.type.module.systemverilog"
789
+ },
790
+ "3": {
791
+ "name": "entity.name.type.module.systemverilog"
792
+ },
793
+ "4": {
794
+ "name": "variable.other.module.systemverilog"
795
+ },
796
+ "5": {
797
+ "patterns": [
798
+ {
799
+ "include": "#selects"
800
+ }
801
+ ]
696
802
  }
697
- ]
698
- },
699
- "base-grammar": {
803
+ },
804
+ "end": "\\)(?:[ \\t\\r\\n]*(;))?",
805
+ "endCaptures": {
806
+ "1": {
807
+ "name": "punctuation.module.instantiation.end.systemverilog"
808
+ }
809
+ },
810
+ "name": "meta.module.no_parameters.systemverilog",
700
811
  "patterns": [
701
812
  {
702
- "include": "#all-types"
813
+ "include": "#module-binding"
703
814
  },
704
815
  {
705
816
  "include": "#comments"
@@ -714,179 +825,137 @@
714
825
  "include": "#strings"
715
826
  },
716
827
  {
717
- "captures": {
718
- "1": {
719
- "name": "storage.type.interface.systemverilog"
720
- }
721
- },
722
- "match": "^\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s+[a-zA-Z_][a-zA-Z0-9_,=\\s]*"
828
+ "include": "#port-net-parameter"
723
829
  },
724
830
  {
725
- "include": "#storage-scope-systemverilog"
726
- }
727
- ]
728
- },
729
- "comments": {
730
- "patterns": [
731
- {
732
- "begin": "/\\*",
733
- "captures": {
734
- "0": {
735
- "name": "punctuation.definition.comment.systemverilog"
736
- }
737
- },
738
- "end": "\\*/",
739
- "name": "comment.block.systemverilog"
831
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_$]*)\\b(?=[ \\t\\r\\n]*(\\(|$))",
832
+ "name": "variable.other.module.systemverilog"
740
833
  },
741
834
  {
742
- "captures": {
743
- "1": {
744
- "name": "punctuation.definition.comment.systemverilog"
745
- }
746
- },
747
- "match": "(//).*$\\n?",
748
- "name": "comment.line.double-slash.systemverilog"
835
+ "include": "#identifiers"
749
836
  }
750
837
  ]
751
838
  },
752
- "constants": {
839
+ "module-parameters": {
840
+ "begin": "[ \\t\\r\\n]*\\b(?:(bind)[ \\t\\r\\n]+([a-zA-Z_][a-zA-Z0-9_$\\.]*)[ \\t\\r\\n]+)?([a-zA-Z_][a-zA-Z0-9_$]*)[ \\t\\r\\n]+(?!intersect|and|or|throughout|within)(?=#[^#])",
841
+ "beginCaptures": {
842
+ "1": {
843
+ "name": "keyword.control.systemverilog"
844
+ },
845
+ "2": {
846
+ "name": "entity.name.type.module.systemverilog"
847
+ },
848
+ "3": {
849
+ "name": "entity.name.type.module.systemverilog"
850
+ }
851
+ },
852
+ "end": "\\)(?:[ \\t\\r\\n]*(;))?",
853
+ "endCaptures": {
854
+ "1": {
855
+ "name": "punctuation.module.instantiation.end.systemverilog"
856
+ }
857
+ },
858
+ "name": "meta.module.parameters.systemverilog",
753
859
  "patterns": [
754
860
  {
755
- "match": "(\\b\\d+)?'(s?[bB]\\s*[0-1xXzZ?][0-1_xXzZ?]*|s?[oO]\\s*[0-7xXzZ?][0-7_xXzZ?]*|s?[dD]\\s*[0-9xXzZ?][0-9_xXzZ?]*|s?[hH]\\s*[0-9a-fA-FxXzZ?][0-9a-fA-F_xXzZ?]*)((e|E)(\\+|-)?[0-9]+)?(?!'|\\w)",
756
- "name": "constant.numeric.systemverilog"
861
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_$]*)\\b(?=[ \\t\\r\\n]*\\()",
862
+ "name": "variable.other.module.systemverilog"
757
863
  },
758
864
  {
759
- "match": "'[01xXzZ]",
760
- "name": "constant.numeric.bit.systemverilog"
865
+ "include": "#module-binding"
761
866
  },
762
867
  {
763
- "match": "\\b((\\d[\\d_]*)(e|E)(\\+|-)?[0-9]+)\\b",
764
- "name": "constant.numeric.exp.systemverilog"
868
+ "include": "#parameters"
765
869
  },
766
870
  {
767
- "match": "\\b(\\d[\\d_]*)\\b",
768
- "name": "constant.numeric.decimal.systemverilog"
871
+ "include": "#comments"
769
872
  },
770
873
  {
771
- "match": "\\b(\\d+(fs|ps|ns|us|ms|s)?)\\b",
772
- "name": "constant.numeric.time.systemverilog"
874
+ "include": "#operators"
773
875
  },
774
876
  {
775
- "match": "\\b([A-Z][A-Z0-9_]*)\\b",
776
- "name": "constant.other.net.systemverilog"
877
+ "include": "#constants"
777
878
  },
778
879
  {
779
- "captures": {
780
- "1": {
781
- "name": "constant.other.preprocessor.systemverilog"
782
- },
783
- "2": {
784
- "name": "support.variable.systemverilog"
785
- }
786
- },
787
- "match": "(`ifdef|`ifndef|`default_nettype)\\s+(\\w+)"
880
+ "include": "#strings"
788
881
  },
789
882
  {
790
- "match": "`(celldefine|else|elsif|endcelldefine|endif|include|line|nounconnected_drive|resetall|timescale|unconnected_drive|undef|begin_\\w+|end_\\w+|remove_\\w+|restore_\\w+)\\b",
791
- "name": "constant.other.preprocessor.systemverilog"
883
+ "include": "#port-net-parameter"
792
884
  },
793
885
  {
794
- "match": "`\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
795
- "name": "constant.other.define.systemverilog"
886
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_$]*)\\b(?=[ \\t\\r\\n]*$)",
887
+ "name": "variable.other.module.systemverilog"
796
888
  },
797
889
  {
798
- "match": "\\b(null)\\b",
799
- "name": "support.constant.systemverilog"
890
+ "include": "#identifiers"
800
891
  }
801
892
  ]
802
893
  },
803
- "functions": {
804
- "match": "\\b(\\w+)(?=\\s*\\()",
805
- "name": "support.function.generic.systemverilog"
806
- },
807
- "ifmodport": {
808
- "captures": {
809
- "1": {
810
- "name": "storage.type.interface.systemverilog"
811
- },
812
- "2": {
813
- "name": "support.modport.systemverilog"
814
- }
815
- },
816
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b"
817
- },
818
- "module-binding": {
819
- "begin": "\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\(",
820
- "beginCaptures": {
821
- "1": {
822
- "name": "support.function.port.systemverilog"
823
- }
824
- },
825
- "captures": {
826
- "1": {
827
- "name": "support.function.port.implicit.systemverilog"
828
- }
829
- },
830
- "end": "\\)",
831
- "match": "\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*",
894
+ "operators": {
832
895
  "patterns": [
833
896
  {
834
- "include": "#constants"
897
+ "match": "\\+=|-=|/=|\\*=|%=|&=|\\|=|\\^=|>>>=|>>=|<<<=|<<=|<=|=",
898
+ "name": "keyword.operator.assignment.systemverilog"
835
899
  },
836
900
  {
837
- "include": "#comments"
901
+ "match": "\\+\\+",
902
+ "name": "keyword.operator.increment.systemverilog"
838
903
  },
839
904
  {
840
- "include": "#operators"
905
+ "match": "--",
906
+ "name": "keyword.operator.decrement.systemverilog"
841
907
  },
842
908
  {
843
- "include": "#strings"
909
+ "match": "\\+|-|\\*\\*|\\*|/|%",
910
+ "name": "keyword.operator.arithmetic.systemverilog"
844
911
  },
845
912
  {
846
- "include": "#constants"
913
+ "match": "!|&&|\\|\\|",
914
+ "name": "keyword.operator.logical.systemverilog"
847
915
  },
848
916
  {
849
- "captures": {
850
- "1": {
851
- "name": "support.type.scope.systemverilog"
852
- },
853
- "2": {
854
- "name": "keyword.operator.scope.systemverilog"
855
- }
856
- },
857
- "match": "\\b([a-zA-Z_]\\w*)(::)"
917
+ "match": "<<<|<<|>>>|>>",
918
+ "name": "keyword.operator.bitwise.shift.systemverilog"
858
919
  },
859
920
  {
860
- "captures": {
861
- "1": {
862
- "name": "storage.type.interface.systemverilog"
863
- },
864
- "2": {
865
- "name": "keyword.operator.cast.systemverilog"
866
- }
867
- },
868
- "match": "\\b([a-zA-Z_]\\w*)(')"
921
+ "match": "~&|~\\||~|\\^~|~\\^|&|\\||\\^|{|'{|}|:|\\?",
922
+ "name": "keyword.operator.bitwise.systemverilog"
869
923
  },
870
924
  {
871
- "match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
872
- "name": "support.function.systemverilog"
925
+ "match": "<=|<|>=|>|==\\?|!=\\?|===|!==|==|!=",
926
+ "name": "keyword.operator.comparison.systemverilog"
873
927
  },
874
928
  {
875
- "match": "\\b(virtual)\\b",
876
- "name": "keyword.control.systemverilog"
929
+ "match": "@|##|#|->|<->",
930
+ "name": "keyword.operator.channel.systemverilog"
931
+ },
932
+ {
933
+ "match": "\\b(?:dist|inside|with|intersect|and|or|throughout|within|first_match)\\b|:=|:/|\\|->|\\|=>|->>|\\*>|#-#|#=#|&&&",
934
+ "name": "keyword.operator.logical.systemverilog"
877
935
  }
878
936
  ]
879
937
  },
880
- "module-param": {
881
- "begin": "(#)\\s*\\(",
938
+ "parameters": {
939
+ "begin": "[ \\t\\r\\n]*(#)[ \\t\\r\\n]*(\\()",
882
940
  "beginCaptures": {
883
941
  "1": {
884
- "name": "keyword.operator.param.systemverilog"
942
+ "name": "keyword.operator.channel.systemverilog"
943
+ },
944
+ "2": {
945
+ "name": "punctuation.section.parameters.begin"
946
+ }
947
+ },
948
+ "end": "(\\))[ \\t\\r\\n]*(?=;|\\(|[a-zA-Z_]|\\\\|$)",
949
+ "endCaptures": {
950
+ "1": {
951
+ "name": "punctuation.section.parameters.end"
885
952
  }
886
953
  },
887
- "end": "\\)",
888
- "name": "meta.module-param.systemverilog",
954
+ "name": "meta.parameters.systemverilog",
889
955
  "patterns": [
956
+ {
957
+ "include": "#port-net-parameter"
958
+ },
890
959
  {
891
960
  "include": "#comments"
892
961
  },
@@ -897,47 +966,32 @@
897
966
  "include": "#operators"
898
967
  },
899
968
  {
900
- "include": "#strings"
901
- },
902
- {
903
- "include": "#module-binding"
904
- },
905
- {
906
- "match": "\\b(virtual)\\b",
907
- "name": "keyword.control.systemverilog"
908
- }
909
- ]
910
- },
911
- "operators": {
912
- "patterns": [
913
- {
914
- "match": "(=|==|===|!=|!==|<=|>=|<|>)",
915
- "name": "keyword.operator.comparison.systemverilog"
969
+ "include": "#strings"
916
970
  },
917
971
  {
918
- "match": "(\\-|\\+|\\*|\\/|%)",
919
- "name": "keyword.operator.arithmetic.systemverilog"
972
+ "include": "#system-tf"
920
973
  },
921
974
  {
922
- "match": "(!|&&|\\|\\||\\bor\\b)",
923
- "name": "keyword.operator.logical.systemverilog"
975
+ "include": "#functions"
924
976
  },
925
977
  {
926
- "match": "(&|\\||\\^|~|{|'{|}|<<|>>|\\?|:)",
927
- "name": "keyword.operator.bitwise.systemverilog"
978
+ "match": "\\bvirtual\\b",
979
+ "name": "storage.modifier.systemverilog"
928
980
  },
929
981
  {
930
- "match": "(#|@)",
931
- "name": "keyword.operator.other.systemverilog"
982
+ "include": "#module-binding"
932
983
  }
933
984
  ]
934
985
  },
935
- "port-dir": {
986
+ "port-net-parameter": {
936
987
  "patterns": [
937
988
  {
938
989
  "captures": {
939
990
  "1": {
940
- "name": "support.type.systemverilog"
991
+ "name": "support.type.direction.systemverilog"
992
+ },
993
+ "2": {
994
+ "name": "storage.type.net.systemverilog"
941
995
  },
942
996
  "3": {
943
997
  "name": "support.type.scope.systemverilog"
@@ -946,72 +1000,127 @@
946
1000
  "name": "keyword.operator.scope.systemverilog"
947
1001
  },
948
1002
  "5": {
949
- "name": "storage.type.interface.systemverilog"
950
- }
951
- },
952
- "match": "\\s*\\b(output|input|inout|ref)\\s+(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)?\\s+(?=\\[[a-zA-Z0-9_\\-\\+]*:[a-zA-Z0-9_\\-\\+]*\\]\\s+[a-zA-Z_][a-zA-Z0-9_\\s]*)"
953
- },
954
- {
955
- "captures": {
956
- "1": {
957
- "name": "support.type.systemverilog"
1003
+ "patterns": [
1004
+ {
1005
+ "include": "#built-ins"
1006
+ },
1007
+ {
1008
+ "match": "[a-zA-Z_][a-zA-Z0-9_$]*",
1009
+ "name": "storage.type.user-defined.systemverilog"
1010
+ }
1011
+ ]
958
1012
  },
959
- "3": {
960
- "name": "support.type.scope.systemverilog"
1013
+ "6": {
1014
+ "patterns": [
1015
+ {
1016
+ "include": "#modifiers"
1017
+ }
1018
+ ]
961
1019
  },
962
- "4": {
963
- "name": "keyword.operator.scope.systemverilog"
1020
+ "7": {
1021
+ "patterns": [
1022
+ {
1023
+ "include": "#selects"
1024
+ }
1025
+ ]
964
1026
  },
965
- "5": {
966
- "name": "storage.type.interface.systemverilog"
1027
+ "8": {
1028
+ "patterns": [
1029
+ {
1030
+ "include": "#constants"
1031
+ },
1032
+ {
1033
+ "include": "#identifiers"
1034
+ }
1035
+ ]
1036
+ },
1037
+ "9": {
1038
+ "patterns": [
1039
+ {
1040
+ "include": "#selects"
1041
+ }
1042
+ ]
967
1043
  }
968
1044
  },
969
- "match": "\\s*\\b(output|input|inout|ref)\\s+(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)?\\s+(?=[a-zA-Z_][a-zA-Z0-9_\\s]*)"
1045
+ "match": ",?[ \\t\\r\\n]*(?:\\b(output|input|inout|ref)\\b[ \\t\\r\\n]*)?(?:\\b(localparam|parameter|var|supply[01]|tri|triand|trior|trireg|tri[01]|uwire|wire|wand|wor)\\b[ \\t\\r\\n]*)?(?:\\b([a-zA-Z_][a-zA-Z0-9_$]*)(::))?(?:([a-zA-Z_][a-zA-Z0-9_$]*)\\b[ \\t\\r\\n]*)?(?:\\b(signed|unsigned)\\b[ \\t\\r\\n]*)?(?:(\\[[a-zA-Z0-9_:$\\.\\-\\+\\*/%`' \\t\\r\\n\\[\\]\\(\\)]*\\])[ \\t\\r\\n]*)?(?<!(?<!#)[:&|=+\\-*/%?><^!~\\(][ \\t\\r\\n]*)\\b([a-zA-Z_][a-zA-Z0-9_$]*)\\b[ \\t\\r\\n]*(\\[[a-zA-Z0-9_:$\\.\\-\\+\\*/%`' \\t\\r\\n\\[\\]\\(\\)]*\\])?[ \\t\\r\\n]*(?=,|;|=|\\)|/|$)",
1046
+ "name": "meta.port-net-parameter.declaration.systemverilog"
1047
+ }
1048
+ ]
1049
+ },
1050
+ "selects": {
1051
+ "begin": "\\[",
1052
+ "beginCaptures": {
1053
+ "0": {
1054
+ "name": "punctuation.slice.brackets.begin"
1055
+ }
1056
+ },
1057
+ "end": "\\]",
1058
+ "endCaptures": {
1059
+ "0": {
1060
+ "name": "punctuation.slice.brackets.end"
1061
+ }
1062
+ },
1063
+ "name": "meta.brackets.select.systemverilog",
1064
+ "patterns": [
1065
+ {
1066
+ "match": "\\$(?![a-z])",
1067
+ "name": "constant.language.systemverilog"
1068
+ },
1069
+ {
1070
+ "include": "#system-tf"
1071
+ },
1072
+ {
1073
+ "include": "#constants"
1074
+ },
1075
+ {
1076
+ "include": "#operators"
1077
+ },
1078
+ {
1079
+ "include": "#cast-operator"
1080
+ },
1081
+ {
1082
+ "include": "#storage-scope"
970
1083
  },
971
1084
  {
972
- "match": "\\s*\\b(output|input|inout|ref)\\b",
973
- "name": "support.type.systemverilog"
1085
+ "match": "[a-zA-Z_][a-zA-Z0-9_$]*",
1086
+ "name": "variable.other.identifier.systemverilog"
974
1087
  }
975
1088
  ]
976
1089
  },
977
- "storage-modifier-systemverilog": {
978
- "match": "\\b(signed|unsigned|small|medium|large|supply[01]|strong[01]|pull[01]|weak[01]|highz[01])\\b",
979
- "name": "storage.modifier.systemverilog"
980
- },
981
- "storage-scope-systemverilog": {
1090
+ "sequence": {
982
1091
  "captures": {
983
1092
  "1": {
984
- "name": "support.type.systemverilog"
1093
+ "name": "keyword.control.systemverilog"
985
1094
  },
986
1095
  "2": {
987
- "name": "keyword.operator.scope.systemverilog"
1096
+ "name": "entity.name.function.systemverilog"
988
1097
  }
989
1098
  },
990
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(::)",
991
- "name": "meta.scope.systemverilog"
1099
+ "match": "[ \\t\\r\\n]*\\b(sequence)[ \\t\\r\\n]+([a-zA-Z_][a-zA-Z0-9_$]*)\\b",
1100
+ "name": "meta.sequence.systemverilog"
992
1101
  },
993
- "storage-type-systemverilog": {
994
- "patterns": [
995
- {
996
- "match": "\\s*\\b(var|wire|tri|tri[01]|supply[01]|wand|triand|wor|trior|trireg|reg|integer|int|longint|shortint|logic|bit|byte|shortreal|string|time|realtime|real|process|void)\\b",
997
- "name": "storage.type.systemverilog"
1102
+ "storage-scope": {
1103
+ "captures": {
1104
+ "1": {
1105
+ "name": "support.type.scope.systemverilog"
998
1106
  },
999
- {
1000
- "match": "\\s*\\b(uvm_transaction|uvm_component|uvm_monitor|uvm_driver|uvm_test|uvm_env|uvm_object|uvm_agent|uvm_sequence_base|uvm_sequence|uvm_sequence_item|uvm_sequence_state|uvm_sequencer|uvm_sequencer_base|uvm_component_registry|uvm_analysis_imp|uvm_analysis_port|uvm_analysis_export|uvm_config_db|uvm_active_passive_enum|uvm_phase|uvm_verbosity|uvm_tlm_analysis_fifo|uvm_tlm_fifo|uvm_report_server|uvm_objection|uvm_recorder|uvm_domain|uvm_reg_field|uvm_reg|uvm_reg_block|uvm_bitstream_t|uvm_radix_enum|uvm_printer|uvm_packer|uvm_comparer|uvm_scope_stack)\\b",
1001
- "name": "storage.type.uvm.systemverilog"
1107
+ "2": {
1108
+ "name": "keyword.operator.scope.systemverilog"
1002
1109
  }
1003
- ]
1110
+ },
1111
+ "match": "\\b([a-zA-Z_][a-zA-Z0-9_$]*)(::)",
1112
+ "name": "meta.scope.systemverilog"
1004
1113
  },
1005
1114
  "strings": {
1006
1115
  "patterns": [
1007
1116
  {
1008
- "begin": "\"",
1117
+ "begin": "`?\"",
1009
1118
  "beginCaptures": {
1010
1119
  "0": {
1011
1120
  "name": "punctuation.definition.string.begin.systemverilog"
1012
1121
  }
1013
1122
  },
1014
- "end": "\"",
1123
+ "end": "\"`?",
1015
1124
  "endCaptures": {
1016
1125
  "0": {
1017
1126
  "name": "punctuation.definition.string.end.systemverilog"
@@ -1020,41 +1129,288 @@
1020
1129
  "name": "string.quoted.double.systemverilog",
1021
1130
  "patterns": [
1022
1131
  {
1023
- "match": "\\\\.",
1132
+ "match": "\\\\(?:[nt\\\\\"vfa]|[0-7]{3}|x[0-9a-fA-F]{2})",
1024
1133
  "name": "constant.character.escape.systemverilog"
1025
1134
  },
1026
1135
  {
1027
- "match": "(?x)%\n(\\d+\\$)?\n[#0\\- +']*\n[,;:_]?\n((-?\\d+)|\\*(-?\\d+\\$)?)?\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?\n[bdiouxXhHDOUeEfFgGaACcSspnmt%]\n",
1028
- "name": "constant.other.placeholder.systemverilog"
1136
+ "match": "(?x)%\n(\\d+\\$)?\n['\\-+0\n[,;:_]?\n((-?\\d+)|\\*(-?\\d+\\$)?)?\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\n(hh|h|ll|l|j|z|t|L)?\n[xXhHdDoObBcClLvVmMpPsStTuUzZeEfFgG%]",
1137
+ "name": "constant.character.format.placeholder.systemverilog"
1029
1138
  },
1030
1139
  {
1031
1140
  "match": "%",
1032
1141
  "name": "invalid.illegal.placeholder.systemverilog"
1142
+ },
1143
+ {
1144
+ "include": "#fixme-todo"
1145
+ }
1146
+ ]
1147
+ },
1148
+ {
1149
+ "begin": "(?<=include)[ \\t\\r\\n]*(<)",
1150
+ "beginCaptures": {
1151
+ "1": {
1152
+ "name": "punctuation.definition.string.begin.systemverilog"
1153
+ }
1154
+ },
1155
+ "end": ">",
1156
+ "endCaptures": {
1157
+ "0": {
1158
+ "name": "punctuation.definition.string.end.systemverilog"
1159
+ }
1160
+ },
1161
+ "name": "string.quoted.other.lt-gt.include.systemverilog"
1162
+ }
1163
+ ]
1164
+ },
1165
+ "sv-control": {
1166
+ "captures": {
1167
+ "1": {
1168
+ "name": "keyword.control.systemverilog"
1169
+ }
1170
+ },
1171
+ "match": "[ \\t\\r\\n]*\\b(initial|always|always_comb|always_ff|always_latch|final|assign|deassign|force|release|wait|forever|repeat|alias|while|for|if|iff|else|case|casex|casez|default|endcase|return|break|continue|do|foreach|clocking|coverpoint|property|bins|binsof|illegal_bins|ignore_bins|randcase|matches|solve|before|expect|cross|ref|srandom|struct|chandle|tagged|extern|throughout|timeprecision|timeunit|priority|type|union|wait_order|triggered|randsequence|context|pure|wildcard|new|forkjoin|unique|unique0|priority)\\b"
1172
+ },
1173
+ "sv-control-begin": {
1174
+ "captures": {
1175
+ "1": {
1176
+ "name": "keyword.control.systemverilog"
1177
+ },
1178
+ "2": {
1179
+ "name": "punctuation.definition.label.systemverilog"
1180
+ },
1181
+ "3": {
1182
+ "name": "entity.name.section.systemverilog"
1183
+ }
1184
+ },
1185
+ "match": "[ \\t\\r\\n]*\\b(begin|fork)\\b(?:[ \\t\\r\\n]*(:)[ \\t\\r\\n]*([a-zA-Z_][a-zA-Z0-9_$]*))?",
1186
+ "name": "meta.item.begin.systemverilog"
1187
+ },
1188
+ "sv-control-end": {
1189
+ "captures": {
1190
+ "1": {
1191
+ "name": "keyword.control.systemverilog"
1192
+ },
1193
+ "2": {
1194
+ "name": "punctuation.definition.label.systemverilog"
1195
+ },
1196
+ "3": {
1197
+ "name": "entity.name.section.systemverilog"
1198
+ }
1199
+ },
1200
+ "match": "[ \\t\\r\\n]*\\b(end|endmodule|endinterface|endprogram|endchecker|endclass|endpackage|endconfig|endfunction|endtask|endproperty|endsequence|endgroup|endprimitive|endclocking|endgenerate|join|join_any|join_none)\\b(?:[ \\t\\r\\n]*(:)[ \\t\\r\\n]*([a-zA-Z_][a-zA-Z0-9_$]*))?",
1201
+ "name": "meta.item.end.systemverilog"
1202
+ },
1203
+ "sv-cover-cross": {
1204
+ "captures": {
1205
+ "2": {
1206
+ "name": "entity.name.type.class.systemverilog"
1207
+ },
1208
+ "3": {
1209
+ "name": "keyword.operator.other.systemverilog"
1210
+ },
1211
+ "4": {
1212
+ "name": "keyword.control.systemverilog"
1213
+ }
1214
+ },
1215
+ "match": "(([a-zA-Z_][a-zA-Z0-9_$]*)[ \\t\\r\\n]*(:))?[ \\t\\r\\n]*(coverpoint|cross)[ \\t\\r\\n]+([a-zA-Z_][a-zA-Z0-9_$]*)",
1216
+ "name": "meta.definition.systemverilog"
1217
+ },
1218
+ "sv-definition": {
1219
+ "captures": {
1220
+ "1": {
1221
+ "name": "keyword.control.systemverilog"
1222
+ },
1223
+ "2": {
1224
+ "name": "entity.name.type.class.systemverilog"
1225
+ }
1226
+ },
1227
+ "match": "[ \\t\\r\\n]*\\b(primitive|package|constraint|interface|covergroup|program)[ \\t\\r\\n]+\\b([a-zA-Z_][a-zA-Z0-9_$]*)\\b",
1228
+ "name": "meta.definition.systemverilog"
1229
+ },
1230
+ "sv-local": {
1231
+ "captures": {
1232
+ "1": {
1233
+ "name": "keyword.other.systemverilog"
1234
+ }
1235
+ },
1236
+ "match": "[ \\t\\r\\n]*\\b(const|static|protected|virtual|localparam|parameter|local)\\b"
1237
+ },
1238
+ "sv-option": {
1239
+ "captures": {
1240
+ "1": {
1241
+ "name": "keyword.cover.systemverilog"
1242
+ }
1243
+ },
1244
+ "match": "[ \\t\\r\\n]*\\b(option)\\."
1245
+ },
1246
+ "sv-rand": {
1247
+ "match": "[ \\t\\r\\n]*\\b(?:rand|randc)\\b",
1248
+ "name": "storage.type.rand.systemverilog"
1249
+ },
1250
+ "sv-std": {
1251
+ "match": "\\b(std)\\b::",
1252
+ "name": "support.class.systemverilog"
1253
+ },
1254
+ "system-tf": {
1255
+ "match": "\\$[a-zA-Z0-9_$][a-zA-Z0-9_$]*\\b",
1256
+ "name": "support.function.systemverilog"
1257
+ },
1258
+ "tables": {
1259
+ "begin": "[ \\t\\r\\n]*\\b(table)\\b",
1260
+ "beginCaptures": {
1261
+ "1": {
1262
+ "name": "keyword.table.systemverilog.begin"
1263
+ }
1264
+ },
1265
+ "end": "[ \\t\\r\\n]*\\b(endtable)\\b",
1266
+ "endCaptures": {
1267
+ "1": {
1268
+ "name": "keyword.table.systemverilog.end"
1269
+ }
1270
+ },
1271
+ "name": "meta.table.systemverilog",
1272
+ "patterns": [
1273
+ {
1274
+ "include": "#comments"
1275
+ },
1276
+ {
1277
+ "match": "\\b[01xXbBrRfFpPnN]\\b",
1278
+ "name": "constant.language.systemverilog"
1279
+ },
1280
+ {
1281
+ "match": "[-*?]",
1282
+ "name": "constant.language.systemverilog"
1283
+ },
1284
+ {
1285
+ "captures": {
1286
+ "1": {
1287
+ "name": "constant.language.systemverilog"
1288
+ }
1289
+ },
1290
+ "match": "\\(([01xX?]{2})\\)"
1291
+ },
1292
+ {
1293
+ "match": ":",
1294
+ "name": "punctuation.definition.label.systemverilog"
1295
+ },
1296
+ {
1297
+ "include": "#operators"
1298
+ },
1299
+ {
1300
+ "include": "#constants"
1301
+ },
1302
+ {
1303
+ "include": "#strings"
1304
+ },
1305
+ {
1306
+ "include": "#identifiers"
1307
+ }
1308
+ ]
1309
+ },
1310
+ "typedef": {
1311
+ "begin": "[ \\t\\r\\n]*\\b(?:(typedef)[ \\t\\r\\n]+)(?:([a-zA-Z_][a-zA-Z0-9_$]*)(?:[ \\t\\r\\n]+\\b(signed|unsigned)\\b)?(?:[ \\t\\r\\n]*(\\[[a-zA-Z0-9_:$\\.\\-\\+\\*/%`' \\t\\r\\n\\[\\]\\(\\)]*\\])?))?(?=[ \\t\\r\\n]*[a-zA-Z_\\\\])",
1312
+ "beginCaptures": {
1313
+ "1": {
1314
+ "name": "keyword.control.systemverilog"
1315
+ },
1316
+ "2": {
1317
+ "patterns": [
1318
+ {
1319
+ "include": "#built-ins"
1320
+ },
1321
+ {
1322
+ "match": "\\bvirtual\\b",
1323
+ "name": "storage.modifier.systemverilog"
1324
+ }
1325
+ ]
1326
+ },
1327
+ "3": {
1328
+ "patterns": [
1329
+ {
1330
+ "include": "#modifiers"
1331
+ }
1332
+ ]
1333
+ },
1334
+ "4": {
1335
+ "patterns": [
1336
+ {
1337
+ "include": "#selects"
1033
1338
  }
1034
1339
  ]
1035
1340
  }
1341
+ },
1342
+ "end": ";",
1343
+ "endCaptures": {
1344
+ "0": {
1345
+ "name": "punctuation.definition.typedef.end.systemverilog"
1346
+ }
1347
+ },
1348
+ "name": "meta.typedef.systemverilog",
1349
+ "patterns": [
1350
+ {
1351
+ "include": "#identifiers"
1352
+ },
1353
+ {
1354
+ "include": "#selects"
1355
+ }
1036
1356
  ]
1037
1357
  },
1038
- "struct-anonymous": {
1039
- "begin": "\\s*\\b(struct|union)\\s*(packed)?\\s*",
1358
+ "typedef-enum-struct-union": {
1359
+ "begin": "[ \\t\\r\\n]*\\b(typedef)[ \\t\\r\\n]+(enum|struct|union(?:[ \\t\\r\\n]+tagged)?|class|interface[ \\t\\r\\n]+class)(?:[ \\t\\r\\n]+(?!packed|signed|unsigned)([a-zA-Z_][a-zA-Z0-9_$]*)?(?:[ \\t\\r\\n]*(\\[[a-zA-Z0-9_:$\\.\\-\\+\\*/%`' \\t\\r\\n\\[\\]\\(\\)]*\\])?))?(?:[ \\t\\r\\n]+(packed))?(?:[ \\t\\r\\n]+(signed|unsigned))?(?=[ \\t\\r\\n]*(?:{|$))",
1040
1360
  "beginCaptures": {
1041
1361
  "1": {
1042
1362
  "name": "keyword.control.systemverilog"
1043
1363
  },
1044
1364
  "2": {
1045
1365
  "name": "keyword.control.systemverilog"
1366
+ },
1367
+ "3": {
1368
+ "patterns": [
1369
+ {
1370
+ "include": "#built-ins"
1371
+ }
1372
+ ]
1373
+ },
1374
+ "4": {
1375
+ "patterns": [
1376
+ {
1377
+ "include": "#selects"
1378
+ }
1379
+ ]
1380
+ },
1381
+ "5": {
1382
+ "name": "storage.modifier.systemverilog"
1383
+ },
1384
+ "6": {
1385
+ "name": "storage.modifier.systemverilog"
1046
1386
  }
1047
1387
  },
1048
- "end": "(})\\s*([a-zA-Z_]\\w*)\\s*;",
1388
+ "end": "(?<=})[ \\t\\r\\n]*([a-zA-Z_][a-zA-Z0-9_$]*|(?<=^|[ \\t\\r\\n])\\\\[!-~]+(?=$|[ \\t\\r\\n]))(?:[ \\t\\r\\n]*(\\[[a-zA-Z0-9_:$\\.\\-\\+\\*/%`' \\t\\r\\n\\[\\]\\(\\)]*\\])?)[ \\t\\r\\n]*[,;]",
1049
1389
  "endCaptures": {
1050
1390
  "1": {
1051
- "name": "keyword.operator.other.systemverilog"
1391
+ "name": "storage.type.systemverilog"
1392
+ },
1393
+ "2": {
1394
+ "patterns": [
1395
+ {
1396
+ "include": "#selects"
1397
+ }
1398
+ ]
1052
1399
  }
1053
1400
  },
1054
- "name": "meta.struct.anonymous.systemverilog",
1401
+ "name": "meta.typedef-enum-struct-union.systemverilog",
1055
1402
  "patterns": [
1403
+ {
1404
+ "include": "#port-net-parameter"
1405
+ },
1406
+ {
1407
+ "include": "#keywords"
1408
+ },
1056
1409
  {
1057
1410
  "include": "#base-grammar"
1411
+ },
1412
+ {
1413
+ "include": "#identifiers"
1058
1414
  }
1059
1415
  ]
1060
1416
  }