github-linguist 4.8.9 → 4.8.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/bin/git-linguist +2 -2
  3. data/grammars/source.ats.json +58 -128
  4. data/grammars/source.autoit.json +158 -153
  5. data/grammars/source.awk.json +333 -383
  6. data/grammars/source.batchfile.json +194 -0
  7. data/grammars/source.c.platform.json +359 -22
  8. data/grammars/source.changelogs.rpm-spec.json +99 -0
  9. data/grammars/source.clojure.json +9 -3
  10. data/grammars/source.dockerfile.json +67 -78
  11. data/grammars/source.elm.json +20 -379
  12. data/grammars/source.emacs.lisp.json +656 -0
  13. data/grammars/source.gdscript.json +233 -228
  14. data/grammars/source.graphql.json +75 -10
  15. data/grammars/source.js.json +2 -2
  16. data/grammars/source.js.jsx.json +247 -839
  17. data/grammars/source.js.regexp.json +1 -1
  18. data/grammars/source.nginx.json +882 -768
  19. data/grammars/source.nsis.json +151 -143
  20. data/grammars/source.objc.json +3 -0
  21. data/grammars/source.objc.platform.json +174 -104
  22. data/grammars/source.puppet.json +429 -396
  23. data/grammars/source.pyjade.json +11 -0
  24. data/grammars/source.regexp.babel.json +1 -1
  25. data/grammars/source.rpm-spec.json +770 -0
  26. data/grammars/source.systemverilog.json +1110 -961
  27. data/grammars/source.ts.json +57 -57
  28. data/grammars/source.tsx.json +57 -57
  29. data/grammars/text.dart-analysis-output.json +67 -152
  30. data/grammars/text.error-list.json +54 -0
  31. data/grammars/text.find-refs.json +927 -0
  32. data/grammars/text.html.basic.json +1 -1
  33. data/grammars/text.html.mediawiki.elm-build-output.json +108 -0
  34. data/grammars/text.html.mediawiki.elm-documentation.json +22 -0
  35. data/grammars/text.html.vue.json +35 -0
  36. data/grammars/text.jade.json +34 -12
  37. data/grammars/text.roff.json +1 -1
  38. data/lib/linguist/heuristics.rb +16 -4
  39. data/lib/linguist/languages.json +1 -1
  40. data/lib/linguist/languages.yml +25 -5
  41. data/lib/linguist/samples.json +1367 -163
  42. data/lib/linguist/version.rb +1 -1
  43. metadata +10 -3
  44. data/grammars/source.dosbatch.json +0 -70
@@ -1,1050 +1,1199 @@
1
1
  {
2
- "fileTypes": [
2
+ "name": "SystemVerilog",
3
+ "file_extensions": [
3
4
  "sv",
4
- "SV",
5
5
  "v",
6
- "V",
7
6
  "svh",
8
- "SVH",
9
- "vh",
10
- "VH"
7
+ "vh"
11
8
  ],
12
- "hidden": true,
13
- "foldingStartMarker": "(begin)\\s*(//.*)?$",
14
- "foldingStopMarker": "^\\s*(begin)$",
15
- "name": "SystemVerilog",
16
- "patterns": [
17
- {
18
- "begin": "\\s*\\b(function|task)\\b(\\s+automatic)?",
19
- "beginCaptures": {
20
- "1": {
21
- "name": "keyword.control.systemverilog"
22
- },
23
- "2": {
24
- "name": "keyword.control.systemverilog"
25
- }
9
+ "scope": "source.systemverilog",
10
+ "variables": {
11
+ "id": "[A-Za-z_][A-Za-z_0-9]*"
12
+ },
13
+ "contexts": {
14
+ "main": [
15
+ {
16
+ "match": "\\s*\\b(local\\s+|protected\\s+)?\\s*\\b(function)\\b(\\s+automatic)?",
17
+ "captures": {
18
+ "1": "keyword.control.systemverilog",
19
+ "2": "keyword.control.systemverilog",
20
+ "3": "keyword.control.systemverilog"
21
+ },
22
+ "push": [
23
+ {
24
+ "meta_scope": "meta.function.systemverilog"
25
+ },
26
+ {
27
+ "match": ";",
28
+ "pop": true
29
+ },
30
+ {
31
+ "match": "\\b(?:({{id}})(::))?({{id}}\\s+)?(?:({{id}})(::))?({{id}}*)\\s*(?=\\(|;)",
32
+ "captures": {
33
+ "1": "support.type.scope.systemverilog",
34
+ "2": "keyword.operator.scope.systemverilog",
35
+ "3": "storage.type.systemverilog",
36
+ "4": "support.type.scope.systemverilog",
37
+ "5": "keyword.operator.scope.systemverilog",
38
+ "6": "entity.name.function.systemverilog"
39
+ }
40
+ },
41
+ {
42
+ "match": "\\(",
43
+ "set": [
44
+ {
45
+ "meta_scope": "meta.function.port.systemverilog"
46
+ },
47
+ {
48
+ "match": "\\)\\s*;",
49
+ "pop": true
50
+ },
51
+ {
52
+ "include": "port-dir"
53
+ },
54
+ {
55
+ "match": "\\s*\\b(?:({{id}})(::))?({{id}})\\s+({{id}})",
56
+ "captures": {
57
+ "1": "support.type.scope.systemverilog",
58
+ "2": "keyword.operator.scope.systemverilog",
59
+ "3": "storage.type.systemverilog"
60
+ }
61
+ },
62
+ {
63
+ "include": "base-grammar"
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "include": "base-grammar"
69
+ }
70
+ ]
26
71
  },
27
- "end": ";",
28
- "patterns": [
29
- {
30
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*\\s+)?([a-zA-Z_][a-zA-Z0-9_:]*)\\s*(?=\\(|;)",
31
- "captures": {
32
- "1": {
33
- "name": "storage.type.systemverilog"
34
- },
35
- "2": {
36
- "name": "entity.name.function.systemverilog"
72
+ {
73
+ "match": "\\s*\\b(?:(local|protected)\\s+)?\\s*\\b(task)\\s+(automatic)?",
74
+ "captures": {
75
+ "1": "keyword.control.systemverilog",
76
+ "2": "keyword.control.systemverilog",
77
+ "3": "keyword.control.systemverilog"
78
+ },
79
+ "push": [
80
+ {
81
+ "meta_scope": "meta.task.systemverilog"
82
+ },
83
+ {
84
+ "match": ";",
85
+ "pop": true
86
+ },
87
+ {
88
+ "match": "\\s*\\b({{id}})\\b",
89
+ "captures": {
90
+ "1": "entity.name.function.systemverilog"
37
91
  }
92
+ },
93
+ {
94
+ "match": "\\(",
95
+ "set": [
96
+ {
97
+ "meta_scope": "meta.task.port.systemverilog"
98
+ },
99
+ {
100
+ "match": "\\)\\s*;",
101
+ "pop": true
102
+ },
103
+ {
104
+ "include": "port-dir"
105
+ },
106
+ {
107
+ "match": "\\s*\\b(?:\\b(virtual)\\s+)?(?:({{id}})(::))?({{id}})\\s+({{id}})",
108
+ "captures": {
109
+ "1": "keyword.other.systemverilog",
110
+ "2": "support.type.scope.systemverilog",
111
+ "3": "keyword.operator.scope.systemverilog",
112
+ "4": "storage.type.systemverilog"
113
+ }
114
+ },
115
+ {
116
+ "include": "base-grammar"
117
+ }
118
+ ]
38
119
  }
39
- },
40
- {
41
- "include": "#port-dir"
42
- },
43
- {
44
- "include": "#base-grammar"
45
- }
46
- ],
47
- "name": "meta.function.systemverilog"
48
- },
49
- {
50
- "match": "\\s*\\b(task)\\s+(automatic)?\\s*(\\w+)\\s*;",
51
- "captures": {
52
- "1": {
53
- "name": "keyword.control.systemverilog"
54
- },
55
- "2": {
56
- "name": "keyword.control.systemverilog"
57
- },
58
- "3": {
59
- "name": "entity.name.function.systemverilog"
120
+ ]
121
+ },
122
+ {
123
+ "match": "\\s*\\b(typedef)\\b",
124
+ "captures": {
125
+ "1": "keyword.control.systemverilog"
126
+ },
127
+ "set": [
128
+ "typedef_symbol",
129
+ "typedef_decl"
130
+ ]
131
+ },
132
+ {
133
+ "match": "\\s*\\b(nettype)\\s+({{id}})\\s+({{id}})(\\s+(with)\\s+({{id}}))?",
134
+ "captures": {
135
+ "1": "keyword.control.systemverilog",
136
+ "2": "storage.type.systemverilog",
137
+ "3": "entity.name.type.systemverilog",
138
+ "5": "keyword.control.systemverilog",
139
+ "6": "support.function.resolve.systemverilog"
60
140
  }
61
141
  },
62
- "name": "meta.task.simple.systemverilog"
63
- },
64
- {
65
- "begin": "\\s*\\b(typedef\\s+(struct|enum|union)\\b)\\s*(packed)?\\s*([a-zA-Z_][a-zA-Z0-9_]*)?",
66
- "beginCaptures": {
67
- "1": {
68
- "name": "keyword.control.systemverilog"
69
- },
70
- "2": {
71
- "name": "keyword.control.systemverilog"
72
- },
73
- "3": {
74
- "name": "keyword.control.systemverilog"
75
- },
76
- "4": {
77
- "name": "storage.type.systemverilog"
142
+ {
143
+ "match": "\\s*(module)\\s+\\b({{id}})\\b",
144
+ "captures": {
145
+ "1": "keyword.control.systemverilog",
146
+ "2": "entity.name.type.module.systemverilog"
147
+ },
148
+ "push": [
149
+ {
150
+ "meta_scope": "meta.module.systemverilog"
151
+ },
152
+ {
153
+ "match": ";",
154
+ "captures": {
155
+ "1": "entity.name.function.systemverilog"
156
+ },
157
+ "pop": true
158
+ },
159
+ {
160
+ "match": "\\s*\\bimport\\b",
161
+ "scope": "keyword.control.systemverilog",
162
+ "push": [
163
+ {
164
+ "match": ";",
165
+ "pop": true
166
+ },
167
+ {
168
+ "match": "\\b({{id}})(::)",
169
+ "captures": {
170
+ "1": "support.type.scope.systemverilog",
171
+ "2": "keyword.operator.scope.systemverilog"
172
+ }
173
+ },
174
+ {
175
+ "match": "\\*",
176
+ "scope": "keyword.operator.systemverilog"
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ "include": "port-dir"
182
+ },
183
+ {
184
+ "match": "\\s*(parameter)",
185
+ "scope": "keyword.other.systemverilog"
186
+ },
187
+ {
188
+ "include": "base-grammar"
189
+ },
190
+ {
191
+ "include": "ifmodport"
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ "match": "\\b(sequence)\\s+({{id}})",
197
+ "scope": "meta.sequence.systemverilog",
198
+ "captures": {
199
+ "1": "keyword.control.systemverilog",
200
+ "2": "entity.name.function.systemverilog"
78
201
  }
79
202
  },
80
- "end": "(})\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*;",
81
- "endCaptures": {
82
- "1": {
83
- "name": "keyword.operator.other.systemverilog"
84
- },
85
- "2": {
86
- "name": "entity.name.function.systemverilog"
203
+ {
204
+ "match": "\\b(bind)\\s+((`\\w+)|([a-zA-Z_][a-zA-Z0-9_\\.]*))\\b",
205
+ "captures": {
206
+ "1": "keyword.control.systemverilog",
207
+ "3": "constant.other.define.systemverilog"
87
208
  }
88
209
  },
89
- "patterns": [
90
- {
91
- "include": "#struct-anonymous"
92
- },
93
- {
94
- "include": "#base-grammar"
210
+ {
211
+ "match": "\\s*\\b(begin)\\b\\s*(:)\\s*({{id}})\\b",
212
+ "scope": "meta.definition.systemverilog",
213
+ "captures": {
214
+ "0": "meta.section.begin.systemverilog",
215
+ "1": "keyword.other.block.systemverilog",
216
+ "2": "keyword.operator.systemverilog",
217
+ "3": "entity.name.section.systemverilog"
95
218
  }
96
- ],
97
- "name": "meta.typedef.struct.systemverilog"
98
- },
99
- {
100
- "match": "\\s*\\b(typedef\\s+class)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*;",
101
- "captures": {
102
- "1": {
103
- "name": "keyword.control.systemverilog"
104
- },
105
- "2": {
106
- "name": "entity.name.declaration.systemverilog"
219
+ },
220
+ {
221
+ "match": "\\s*\\b(fork)\\b\\s*(:)\\s*({{id}})\\b",
222
+ "scope": "meta.definition.systemverilog",
223
+ "captures": {
224
+ "0": "meta.section.fork.systemverilog",
225
+ "1": "keyword.control.systemverilog",
226
+ "2": "keyword.operator.systemverilog",
227
+ "3": "entity.name.section.systemverilog"
107
228
  }
108
229
  },
109
- "name": "meta.typedef.class.systemverilog"
110
- },
111
- {
112
- "begin": "\\s*\\b(typedef)\\b",
113
- "beginCaptures": {
114
- "1": {
115
- "name": "keyword.control.systemverilog"
230
+ {
231
+ "match": "\\b(property)\\s+(\\w+)",
232
+ "captures": {
233
+ "1": "keyword.sva.systemverilog",
234
+ "2": "entity.name.sva.systemverilog"
116
235
  }
117
236
  },
118
- "end": "([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=(\\[[a-zA-Z0-9_:\\$\\-\\+]*\\])?;)",
119
- "endCaptures": {
120
- "1": {
121
- "name": "entity.name.function.systemverilog"
237
+ {
238
+ "match": "\\b(\\w+)\\s*(:)\\s*(assert)\\b",
239
+ "captures": {
240
+ "1": "entity.name.sva.systemverilog",
241
+ "2": "keyword.operator.systemverilog",
242
+ "3": "keyword.sva.systemverilog"
122
243
  }
123
244
  },
124
- "patterns": [
125
- {
126
- "match": "\\b([a-zA-Z_]\\w*)\\s*(#)\\(",
127
- "captures": {
128
- "1": {
129
- "name": "storage.type.userdefined.systemverilog"
245
+ {
246
+ "match": "\\s*(//)\\s*(psl)\\s+((\\w+)\\s*(:))?\\s*(default|assert|assume)",
247
+ "captures": {
248
+ "0": "meta.psl.systemverilog",
249
+ "1": "comment.line.double-slash.systemverilog",
250
+ "2": "keyword.psl.systemverilog",
251
+ "4": "entity.psl.name.systemverilog",
252
+ "5": "keyword.operator.systemverilog",
253
+ "6": "keyword.psl.systemverilog"
254
+ },
255
+ "push": [
256
+ {
257
+ "meta_scope": "meta.psl.systemverilog"
258
+ },
259
+ {
260
+ "match": ";",
261
+ "pop": true
262
+ },
263
+ {
264
+ "match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge)\\b",
265
+ "scope": "keyword.psl.systemverilog"
266
+ },
267
+ {
268
+ "include": "operators"
269
+ },
270
+ {
271
+ "include": "functions"
272
+ },
273
+ {
274
+ "include": "constants"
275
+ }
276
+ ]
277
+ },
278
+ {
279
+ "match": "\\s*(/\\*)\\s*(psl)",
280
+ "captures": {
281
+ "0": "meta.psl.systemverilog",
282
+ "1": "comment.block.systemverilog",
283
+ "2": "keyword.psl.systemverilog"
284
+ },
285
+ "push": [
286
+ {
287
+ "meta_scope": "meta.psl.systemverilog"
288
+ },
289
+ {
290
+ "match": "(\\*/)",
291
+ "captures": {
292
+ "1": "comment.block.systemverilog"
130
293
  },
131
- "2": {
132
- "name": "keyword.operator.param.systemverilog"
294
+ "pop": true
295
+ },
296
+ {
297
+ "match": "^\\s*((\\w+)\\s*(:))?\\s*(default|assert|assume)",
298
+ "captures": {
299
+ "0": "meta.psl.systemverilog",
300
+ "2": "entity.psl.name.systemverilog",
301
+ "3": "keyword.operator.systemverilog",
302
+ "4": "keyword.psl.systemverilog"
133
303
  }
134
304
  },
135
- "name": "meta.typedef.class.systemverilog"
136
- },
137
- {
138
- "include": "#base-grammar"
139
- },
140
- {
141
- "include": "#module-binding"
305
+ {
306
+ "match": "\\b(property)\\s+(\\w+)",
307
+ "captures": {
308
+ "1": "keyword.psl.systemverilog",
309
+ "2": "entity.psl.name.systemverilog"
310
+ }
311
+ },
312
+ {
313
+ "match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge|negedge)\\b",
314
+ "scope": "keyword.psl.systemverilog"
315
+ },
316
+ {
317
+ "include": "operators"
318
+ },
319
+ {
320
+ "include": "functions"
321
+ },
322
+ {
323
+ "include": "constants"
324
+ }
325
+ ]
326
+ },
327
+ {
328
+ "match": "\\s*\\b(automatic|cell|config|deassign|defparam|design|disable|edge|endconfig|endgenerate|endspecify|endtable|generate|genvar|ifnone|incdir|instance|liblist|library|macromodule|negedge|noshowcancelled|posedge|pulsestyle_onevent|pulsestyle_ondetect|scalared|showcancelled|specify|specparam|table|use|vectored)\\b",
329
+ "captures": {
330
+ "1": "keyword.other.systemverilog"
142
331
  }
143
- ],
144
- "name": "meta.typedef.simple.systemverilog"
145
- },
146
- {
147
- "begin": "\\s*(module)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
148
- "beginCaptures": {
149
- "1": {
150
- "name": "keyword.control.systemverilog"
151
- },
152
- "2": {
153
- "name": "entity.name.type.module.systemverilog"
332
+ },
333
+ {
334
+ "match": "\\s*\\b(initial|always|begin|fork|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|assert|assume|before|expect|cross|ref|first_match|srandom|struct|packed|final|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|forkjoin|unique|unique0|priority)\\b",
335
+ "captures": {
336
+ "1": "keyword.control.systemverilog"
154
337
  }
155
338
  },
156
- "end": ";",
157
- "endCaptures": {
158
- "1": {
159
- "name": "entity.name.function.systemverilog"
339
+ {
340
+ "match": "\\s*\\b(end)\\b(\\s*(:)\\s*(\\w+))?",
341
+ "captures": {
342
+ "1": "keyword.other.block.systemverilog",
343
+ "3": "keyword.operator.systemverilog",
344
+ "4": "entity.label.systemverilog"
160
345
  }
161
346
  },
162
- "patterns": [
163
- {
164
- "include": "#port-dir"
165
- },
166
- {
167
- "match": "\\s*(parameter)",
168
- "name": "keyword.other.systemverilog"
169
- },
170
- {
171
- "include": "#base-grammar"
172
- },
173
- {
174
- "include": "#ifmodport"
347
+ {
348
+ "match": "\\s*\\b(endtask|endmodule|endfunction|endprimitive|endclass|endpackage|endsequence|endprogram|endclocking|endproperty|endgroup|endinterface|join|join_any|join_none)\\b(\\s*(:)\\s*(\\w+))?",
349
+ "scope": "meta.object.end.systemverilog",
350
+ "captures": {
351
+ "1": "keyword.control.systemverilog",
352
+ "3": "keyword.operator.systemverilog",
353
+ "4": "entity.label.systemverilog"
175
354
  }
176
- ],
177
- "name": "meta.module.systemverilog"
178
- },
179
- {
180
- "captures": {
181
- "1": {
182
- "name": "keyword.control.systemverilog"
183
- },
184
- "2": {
185
- "name": "entity.name.function.systemverilog"
355
+ },
356
+ {
357
+ "match": "\\b(std)\\b::",
358
+ "scope": "support.class.systemverilog"
359
+ },
360
+ {
361
+ "match": "^\\s*(`define)\\s+({{id}})",
362
+ "scope": "meta.define.systemverilog",
363
+ "captures": {
364
+ "1": "constant.other.preprocessor.systemverilog",
365
+ "2": "entity.name.type.define.systemverilog"
186
366
  }
187
367
  },
188
- "match": "\\b(sequence)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
189
- "name": "meta.sequence.systemverilog"
190
- },
191
- {
192
- "match": "\\b(bind)\\s+([a-zA-Z_][a-zA-Z0-9_\\.]*)\\b",
193
- "captures": {
194
- "1": {
195
- "name": "keyword.control.systemverilog"
368
+ {
369
+ "include": "comments"
370
+ },
371
+ {
372
+ "match": "\\s*(primitive|package|constraint|interface|covergroup|program)\\s+\\b({{id}})\\b",
373
+ "scope": "meta.definition.systemverilog",
374
+ "captures": {
375
+ "1": "keyword.control.systemverilog",
376
+ "2": "entity.name.type.class.systemverilog"
196
377
  }
197
- }
198
- },
199
- {
200
- "captures": {
201
- "0": {
202
- "name": "meta.section.begin.systemverilog"
203
- },
204
- "1": {
205
- "name": "keyword.other.block.systemverilog"
206
- },
207
- "3": {
208
- "name": "keyword.operator.systemverilog"
209
- },
210
- "4": {
211
- "name": "entity.name.section.systemverilog"
378
+ },
379
+ {
380
+ "match": "(({{id}})\\s*(:))?\\s*(coverpoint|cross)\\s+([A-Za-z_][A-Za-z_0-9\\.]*)",
381
+ "scope": "meta.definition.systemverilog",
382
+ "captures": {
383
+ "2": "entity.name.type.class.systemverilog",
384
+ "3": "keyword.operator.other.systemverilog",
385
+ "4": "keyword.control.systemverilog"
212
386
  }
213
387
  },
214
- "match": "\\s*(begin|fork)\\s*((:)\\s*([a-zA-Z_][a-zA-Z0-9_]*))\\b",
215
- "name": "meta.definition.systemverilog"
216
- },
217
- {
218
- "match": "\\b(property)\\s+(\\w+)",
219
- "captures": {
220
- "1": {
221
- "name": "keyword.sva.systemverilog"
222
- },
223
- "2": {
224
- "name": "entity.name.sva.systemverilog"
388
+ {
389
+ "match": "\\s*\\b(virtual\\s+)?(class)\\s+\\b({{id}})\\b",
390
+ "scope": "meta.definition.class.systemverilog",
391
+ "captures": {
392
+ "1": "keyword.control.systemverilog",
393
+ "2": "keyword.control.systemverilog",
394
+ "3": "entity.name.type.class.systemverilog"
225
395
  }
226
- }
227
- },
228
- {
229
- "match": "\\b(\\w+)\\s*(:)\\s*(assert)\\b",
230
- "captures": {
231
- "1": {
232
- "name": "entity.name.sva.systemverilog"
233
- },
234
- "2": {
235
- "name": "keyword.operator.systemverilog"
236
- },
237
- "3": {
238
- "name": "keyword.sva.systemverilog"
396
+ },
397
+ {
398
+ "match": "\\b(extends)\\s+(?:({{id}})(::))?({{id}})\\b",
399
+ "scope": "meta.definition.systemverilog",
400
+ "captures": {
401
+ "1": "keyword.control.systemverilog",
402
+ "2": "support.type.scope.systemverilog",
403
+ "3": "keyword.operator.scope.systemverilog",
404
+ "4": "entity.other.inherited-class.systemverilog"
239
405
  }
240
- }
241
- },
242
- {
243
- "begin": "\\s*(//)\\s*(psl)\\s+((\\w+)\\s*(:))?\\s*(default|assert|assume)",
244
- "beginCaptures": {
245
- "0": {
246
- "name": "meta.psl.systemverilog"
247
- },
248
- "1": {
249
- "name": "comment.line.double-slash.systemverilog"
250
- },
251
- "2": {
252
- "name": "keyword.psl.systemverilog"
253
- },
254
- "4": {
255
- "name": "entity.psl.name.systemverilog"
256
- },
257
- "5": {
258
- "name": "keyword.operator.systemverilog"
259
- },
260
- "6": {
261
- "name": "keyword.psl.systemverilog"
406
+ },
407
+ {
408
+ "include": "all-types"
409
+ },
410
+ {
411
+ "include": "operators"
412
+ },
413
+ {
414
+ "include": "port-dir"
415
+ },
416
+ {
417
+ "match": "\\b(and|nand|nor|or|xor|xnor|buf|not|bufif[01]|notif[01]|r?[npc]mos|tran|r?tranif[01]|pullup|pulldown)\\b",
418
+ "scope": "support.type.systemverilog"
419
+ },
420
+ {
421
+ "include": "strings"
422
+ },
423
+ {
424
+ "match": "\\$\\b({{id}})\\b",
425
+ "scope": "support.function.systemverilog"
426
+ },
427
+ {
428
+ "match": "\\b({{id}})(')(?=\\()",
429
+ "scope": "meta.cast.systemverilog",
430
+ "captures": {
431
+ "1": "storage.type.systemverilog",
432
+ "2": "keyword.operator.cast.systemverilog"
262
433
  }
263
434
  },
264
- "end": ";",
265
- "patterns": [
266
- {
267
- "match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge)\\b",
268
- "name": "keyword.psl.systemverilog"
269
- },
270
- {
271
- "include": "#operators"
272
- },
273
- {
274
- "include": "#functions"
275
- },
276
- {
277
- "include": "#constants"
435
+ {
436
+ "match": "^\\s*(localparam|parameter)\\s+([A-Z_][A-Z0-9_]*)\\b\\s*(?=(=))",
437
+ "scope": "meta.param.systemverilog",
438
+ "captures": {
439
+ "1": "keyword.other.systemverilog",
440
+ "2": "constant.other.systemverilog"
278
441
  }
279
- ],
280
- "name": "meta.psl.systemverilog"
281
- },
282
- {
283
- "begin": "\\s*(/\\*)\\s*(psl)",
284
- "beginCaptures": {
285
- "0": {
286
- "name": "meta.psl.systemverilog"
287
- },
288
- "1": {
289
- "name": "comment.block.systemverilog"
290
- },
291
- "2": {
292
- "name": "keyword.psl.systemverilog"
442
+ },
443
+ {
444
+ "match": "^\\s*(localparam|parameter)\\s+({{id}})\\b\\s*(?=(=))",
445
+ "scope": "meta.param.systemverilog",
446
+ "captures": {
447
+ "1": "keyword.other.systemverilog"
293
448
  }
294
449
  },
295
- "end": "(\\*/)",
296
- "endCaptures": {
297
- "1": {
298
- "name": "comment.block.systemverilog"
450
+ {
451
+ "match": "^\\s*(static\\s+)?(local\\s+|protected\\s+|localparam\\s+|parameter\\s+)?(const\\s+|virtual\\s+)?(rand\\s+|randc\\s+)?(?:(var|wire)\\s+)?(({{id}})(::))?({{id}}\\b)?\\s*(?=(#\\s*\\([\\w,\\:#\\(\\)]+\\)\\s*)?(\\s*\\[.*?\\]\\s*)*{{id}}(\\s*\\[.*?\\]\\s*)*\\s*(;|,|=|'\\{))",
452
+ "scope": "meta.userdefined.systemverilog",
453
+ "captures": {
454
+ "1": "keyword.other.systemverilog",
455
+ "2": "keyword.other.systemverilog",
456
+ "3": "keyword.other.systemverilog",
457
+ "4": "storage.type.rand.systemverilog",
458
+ "5": "storage.type.net.systemverilog",
459
+ "7": "support.type.scope.systemverilog",
460
+ "8": "keyword.operator.scope.systemverilog",
461
+ "9": "storage.type.userdefined.systemverilog"
299
462
  }
300
463
  },
301
- "patterns": [
302
- {
303
- "match": "^\\s*((\\w+)\\s*(:))?\\s*(default|assert|assume)",
304
- "captures": {
305
- "0": {
306
- "name": "meta.psl.systemverilog"
307
- },
308
- "2": {
309
- "name": "entity.psl.name.systemverilog"
310
- },
311
- "3": {
312
- "name": "keyword.operator.systemverilog"
313
- },
314
- "4": {
315
- "name": "keyword.psl.systemverilog"
316
- }
464
+ {
465
+ "match": "\\s*\\b(option)\\.",
466
+ "captures": {
467
+ "1": "keyword.cover.systemverilog"
468
+ }
469
+ },
470
+ {
471
+ "match": "\\s*\\b(static|local|const|protected|virtual|localparam|parameter)\\b",
472
+ "captures": {
473
+ "1": "keyword.other.systemverilog"
474
+ }
475
+ },
476
+ {
477
+ "match": "\\s*\\b(rand|randc)\\b",
478
+ "scope": "storage.type.rand.systemverilog"
479
+ },
480
+ {
481
+ "match": "^(\\s*(bind)\\s+((`\\w+)|([a-zA-Z_][\\w\\.]*)))?\\s*({{id}})\\s*(?=#[^#])",
482
+ "captures": {
483
+ "2": "keyword.control.systemverilog",
484
+ "4": "constant.other.define.systemverilog",
485
+ "6": "storage.type.module.systemverilog"
486
+ },
487
+ "push": [
488
+ {
489
+ "meta_scope": "meta.module.inst.param.systemverilog"
490
+ },
491
+ {
492
+ "match": ";|(?==|:)",
493
+ "pop": true
494
+ },
495
+ {
496
+ "match": "\\(",
497
+ "push": [
498
+ {
499
+ "include": "module-binding"
500
+ },
501
+ {
502
+ "include": "module-param"
503
+ },
504
+ {
505
+ "include": "storage-scope-systemverilog"
506
+ },
507
+ {
508
+ "include": "comments"
509
+ },
510
+ {
511
+ "include": "operators"
512
+ },
513
+ {
514
+ "include": "constants"
515
+ },
516
+ {
517
+ "include": "strings"
518
+ },
519
+ {
520
+ "match": "\\)",
521
+ "pop": true
522
+ }
523
+ ]
524
+ },
525
+ {
526
+ "match": "\\#",
527
+ "scope": "keyword.operator.param.systemverilog"
528
+ },
529
+ {
530
+ "include": "comments"
531
+ },
532
+ {
533
+ "match": "\\b({{id}})\\b(?=\\s*(\\(|$))",
534
+ "scope": "entity.name.type.module.systemverilog"
317
535
  }
318
- },
319
- {
320
- "match": "\\b(property)\\s+(\\w+)",
321
- "captures": {
322
- "1": {
323
- "name": "keyword.psl.systemverilog"
324
- },
325
- "2": {
326
- "name": "entity.psl.name.systemverilog"
536
+ ]
537
+ },
538
+ {
539
+ "match": "\\b({{id}})\\s+(?!intersect\\b|and\\b|or\\b|throughout\\b|within\\b)({{id}})\\s*(\\[(\\d+)(\\:(\\d+))?\\])?\\s*(\\(|$)",
540
+ "captures": {
541
+ "1": "storage.type.module.systemverilog",
542
+ "2": "entity.name.type.module.systemverilog",
543
+ "4": "constant.numeric.systemverilog",
544
+ "6": "constant.numeric.systemverilog"
545
+ },
546
+ "push": [
547
+ {
548
+ "meta_scope": "meta.module.inst.systemverilog"
549
+ },
550
+ {
551
+ "match": ";",
552
+ "pop": true
553
+ },
554
+ {
555
+ "include": "module-binding"
556
+ },
557
+ {
558
+ "include": "storage-scope-systemverilog"
559
+ },
560
+ {
561
+ "include": "comments"
562
+ },
563
+ {
564
+ "include": "strings"
565
+ },
566
+ {
567
+ "include": "operators"
568
+ },
569
+ {
570
+ "include": "constants"
571
+ }
572
+ ]
573
+ },
574
+ {
575
+ "match": "\\s*(<?=|\\?)\\s*(\\'{)",
576
+ "captures": {
577
+ "1": "keyword.operator.other.systemverilog",
578
+ "2": "keyword.operator.other.systemverilog",
579
+ "3": "keyword.operator.other.systemverilog"
580
+ },
581
+ "push": [
582
+ {
583
+ "meta_scope": "meta.struct.assign.systemverilog"
584
+ },
585
+ {
586
+ "match": ";",
587
+ "pop": true
588
+ },
589
+ {
590
+ "match": "\\?",
591
+ "scope": "keyword.operator.systemverilog",
592
+ "push": [
593
+ {
594
+ "match": "(?:,|})",
595
+ "pop": true
596
+ },
597
+ {
598
+ "include": "base-grammar"
599
+ }
600
+ ]
601
+ },
602
+ {
603
+ "match": "\\b({{id}})\\s*(:)(?!:)",
604
+ "captures": {
605
+ "1": "support.function.field.systemverilog",
606
+ "2": "keyword.operator.other.systemverilog"
327
607
  }
608
+ },
609
+ {
610
+ "include": "comments"
611
+ },
612
+ {
613
+ "include": "strings"
614
+ },
615
+ {
616
+ "include": "operators"
617
+ },
618
+ {
619
+ "include": "constants"
620
+ },
621
+ {
622
+ "include": "storage-scope-systemverilog"
328
623
  }
329
- },
330
- {
331
- "match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge|negedge)\\b",
332
- "name": "keyword.psl.systemverilog"
333
- },
334
- {
335
- "include": "#operators"
336
- },
337
- {
338
- "include": "#functions"
339
- },
340
- {
341
- "include": "#constants"
342
- }
343
- ],
344
- "name": "meta.psl.systemverilog"
345
- },
346
- {
347
- "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",
348
- "captures": {
349
- "1": {
350
- "name": "keyword.other.systemverilog"
624
+ ]
625
+ },
626
+ {
627
+ "include": "storage-scope-systemverilog"
628
+ },
629
+ {
630
+ "include": "functions"
631
+ },
632
+ {
633
+ "include": "constants"
634
+ },
635
+ {
636
+ "match": "\\[\\s*(\\$)\\s*\\]",
637
+ "captures": {
638
+ "1": "keyword.operator.systemverilog"
351
639
  }
640
+ },
641
+ {
642
+ "match": "^\\s*\\(\\*",
643
+ "captures": {
644
+ "0": "punctuation.definition.attribute.systemverilog"
645
+ },
646
+ "push": [
647
+ {
648
+ "meta_scope": "comment.attribute.systemverilog"
649
+ },
650
+ {
651
+ "match": "\\*\\)",
652
+ "pop": true,
653
+ "captures": {
654
+ "0": "punctuation.definition.attribute.systemverilog"
655
+ }
656
+ }
657
+ ]
658
+ },
659
+ {
660
+ "match": "\\(",
661
+ "push": [
662
+ {
663
+ "match": "\\)",
664
+ "pop": true
665
+ },
666
+ {
667
+ "match": "[^\\)\\n]*$(?!\\n)",
668
+ "scope": "invalid.illegal.unbalanced-bracket"
669
+ },
670
+ {
671
+ "include": "main"
672
+ }
673
+ ]
674
+ },
675
+ {
676
+ "match": "\\[",
677
+ "push": [
678
+ {
679
+ "match": "\\]",
680
+ "pop": true
681
+ },
682
+ {
683
+ "match": "[^\\]\\n]*$(?!\\n)",
684
+ "scope": "invalid.illegal.unbalanced-bracket"
685
+ },
686
+ {
687
+ "include": "main"
688
+ }
689
+ ]
690
+ },
691
+ {
692
+ "match": "\\)|\\]",
693
+ "scope": "invalid.illegal.stray-bracket-end"
352
694
  }
353
- },
354
- {
355
- "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",
356
- "captures": {
357
- "1": {
358
- "name": "keyword.control.systemverilog"
359
- }
695
+ ],
696
+ "all-types": [
697
+ {
698
+ "include": "storage-type-systemverilog"
699
+ },
700
+ {
701
+ "include": "storage-modifier-systemverilog"
360
702
  }
361
- },
362
- {
363
- "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+))?",
364
- "captures": {
365
- "1": {
366
- "name": "keyword.control.systemverilog"
367
- },
368
- "3": {
369
- "name": "keyword.operator.systemverilog"
370
- },
371
- "4": {
372
- "name": "entity.label.systemverilog"
373
- }
703
+ ],
704
+ "base-grammar": [
705
+ {
706
+ "include": "all-types"
374
707
  },
375
- "name": "meta.object.end.systemverilog"
376
- },
377
- {
378
- "match": "\\b(std)\\b::",
379
- "name": "support.class.systemverilog"
380
- },
381
- {
382
- "captures": {
383
- "1": {
384
- "name": "constant.other.define.systemverilog"
385
- },
386
- "2": {
387
- "name": "entity.name.type.define.systemverilog"
388
- }
708
+ {
709
+ "include": "comments"
389
710
  },
390
- "match": "^\\s*(`define)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
391
- "name": "meta.define.systemverilog"
392
- },
393
- {
394
- "include": "#comments"
395
- },
396
- {
397
- "captures": {
398
- "1": {
399
- "name": "keyword.control.systemverilog"
400
- },
401
- "2": {
402
- "name": "entity.name.type.class.systemverilog"
403
- }
711
+ {
712
+ "include": "operators"
404
713
  },
405
- "match": "\\s*(primitive|package|constraint|interface|covergroup|program)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
406
- "name": "meta.definition.systemverilog"
407
- },
408
- {
409
- "captures": {
410
- "2": {
411
- "name": "entity.name.type.class.systemverilog"
412
- },
413
- "3": {
414
- "name": "keyword.operator.other.systemverilog"
415
- },
416
- "4": {
417
- "name": "keyword.control.systemverilog"
418
- }
714
+ {
715
+ "include": "constants"
419
716
  },
420
- "match": "(([a-zA-Z_][a-zA-Z0-9_]*)\\s*(:))?\\s*(coverpoint|cross)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
421
- "name": "meta.definition.systemverilog"
422
- },
423
- {
424
- "captures": {
425
- "1": {
426
- "name": "keyword.control.systemverilog"
427
- },
428
- "2": {
429
- "name": "keyword.control.systemverilog"
430
- },
431
- "3": {
432
- "name": "entity.name.type.class.systemverilog"
433
- }
717
+ {
718
+ "include": "strings"
434
719
  },
435
- "match": "\\b(virtual\\s+)?(class)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
436
- "name": "meta.definition.class.systemverilog"
437
- },
438
- {
439
- "captures": {
440
- "1": {
441
- "name": "keyword.control.systemverilog"
442
- },
443
- "2": {
444
- "name": "entity.other.inherited-class.systemverilog"
720
+ {
721
+ "match": "^\\s*(?:(var|wire)\\s+)?(({{id}})(::))?({{id}})\\s+[a-zA-Z_][a-zA-Z0-9_,=\\s]*",
722
+ "captures": {
723
+ "1": "storage.type.userdefined.systemverilog",
724
+ "3": "support.type.scope.systemverilog",
725
+ "4": "keyword.operator.scope.systemverilog",
726
+ "5": "storage.type.userdefined.systemverilog"
445
727
  }
446
728
  },
447
- "match": "\\b(extends)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b",
448
- "name": "meta.definition.systemverilog"
449
- },
450
- {
451
- "include": "#all-types"
452
- },
453
- {
454
- "include": "#operators"
455
- },
456
- {
457
- "include": "#port-dir"
458
- },
459
- {
460
- "match": "\\b(and|nand|nor|or|xor|xnor|buf|not|bufif[01]|notif[01]|r?[npc]mos|tran|r?tranif[01]|pullup|pulldown)\\b",
461
- "name": "support.type.systemverilog"
462
- },
463
- {
464
- "include": "#strings"
465
- },
466
- {
467
- "match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
468
- "name": "support.function.systemverilog"
469
- },
470
- {
471
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(')(?=\\()",
472
- "name": "meta.cast.systemverilog",
473
- "captures": {
474
- "1": {
475
- "name": "storage.type.systemverilog"
476
- },
477
- "2": {
478
- "name": "keyword.operator.cast.systemverilog"
479
- }
729
+ {
730
+ "match": "\\b(var|wire)\\b",
731
+ "scope": "storage.type.net.systemverilog"
732
+ },
733
+ {
734
+ "include": "storage-scope-systemverilog"
480
735
  }
481
- },
482
- {
483
- "match": "^\\s*(localparam|parameter)\\s+([A-Z_][A-Z0-9_]*)\\b\\s*(?=(=))",
484
- "name": "meta.param.systemverilog",
485
- "captures": {
486
- "1": {
487
- "name": "keyword.other.systemverilog"
488
- },
489
- "2": {
490
- "name": "constant.other.systemverilog"
736
+ ],
737
+ "comments": [
738
+ {
739
+ "match": "/\\*",
740
+ "captures": {
741
+ "0": "punctuation.definition.comment.systemverilog"
742
+ },
743
+ "push": [
744
+ {
745
+ "meta_scope": "comment.block.systemverilog"
746
+ },
747
+ {
748
+ "match": "\\*/",
749
+ "pop": true
750
+ }
751
+ ]
752
+ },
753
+ {
754
+ "match": "(//).*$\\n?",
755
+ "scope": "comment.line.double-slash.systemverilog",
756
+ "captures": {
757
+ "1": "punctuation.definition.comment.systemverilog"
491
758
  }
492
759
  }
493
- },
494
- {
495
- "match": "^\\s*(localparam|parameter)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=(=))",
496
- "name": "meta.param.systemverilog",
497
- "captures": {
498
- "1": {
499
- "name": "keyword.other.systemverilog"
760
+ ],
761
+ "constants": [
762
+ {
763
+ "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)",
764
+ "scope": "constant.numeric.systemverilog"
765
+ },
766
+ {
767
+ "match": "'[01xXzZ]",
768
+ "scope": "constant.numeric.bit.systemverilog"
769
+ },
770
+ {
771
+ "match": "\\b((\\d[\\d_]*)(e|E)(\\+|-)?[0-9]+)\\b",
772
+ "scope": "constant.numeric.exp.systemverilog"
773
+ },
774
+ {
775
+ "match": "\\b(\\d[\\d_]*)\\b",
776
+ "scope": "constant.numeric.decimal.systemverilog"
777
+ },
778
+ {
779
+ "match": "\\b(\\d+(fs|ps|ns|us|ms|s)?)\\b",
780
+ "scope": "constant.numeric.time.systemverilog"
781
+ },
782
+ {
783
+ "match": "\\b([A-Z][A-Z0-9_]*)\\b",
784
+ "scope": "constant.other.net.systemverilog"
785
+ },
786
+ {
787
+ "match": "(`ifdef|`ifndef|`default_nettype)\\s+(\\w+)",
788
+ "captures": {
789
+ "1": "constant.other.preprocessor.systemverilog",
790
+ "2": "support.variable.systemverilog"
500
791
  }
792
+ },
793
+ {
794
+ "match": "`(celldefine|else|elsif|endcelldefine|endif|include|line|nounconnected_drive|resetall|timescale|unconnected_drive|undef|begin_\\w+|end_\\w+|remove_\\w+|restore_\\w+)\\b",
795
+ "scope": "constant.other.preprocessor.systemverilog"
796
+ },
797
+ {
798
+ "match": "``\\b({{id}})\\b",
799
+ "scope": "variable.macro.systemverilog"
800
+ },
801
+ {
802
+ "match": "`\\b({{id}})\\b",
803
+ "scope": "constant.other.define.systemverilog"
804
+ },
805
+ {
806
+ "match": "\\b(null)\\b",
807
+ "scope": "support.constant.systemverilog"
501
808
  }
502
- },
503
- {
504
- "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\\[\\]']*)(;|,|=|'\\{))",
505
- "name": "meta.userdefined.systemverilog",
506
- "captures": {
507
- "1": {
508
- "name": "keyword.other.systemverilog"
509
- },
510
- "2": {
511
- "name": "keyword.other.systemverilog"
512
- },
513
- "3": {
514
- "name": "storage.type.rand.systemverilog"
515
- },
516
- "5": {
517
- "name": "support.type.scope.systemverilog"
518
- },
519
- "6": {
520
- "name": "keyword.operator.scope.systemverilog"
521
- },
522
- "7": {
523
- "name": "storage.type.userdefined.systemverilog"
524
- }
809
+ ],
810
+ "functions": [
811
+ {
812
+ "match": "\\b(\\w+)(?=\\s*\\()",
813
+ "scope": "support.function.generic.systemverilog"
525
814
  }
526
- },
527
- {
528
- "match": "\\s*\\b(option)\\.",
529
- "captures": {
530
- "1": {
531
- "name": "keyword.cover.systemverilog"
815
+ ],
816
+ "ifmodport": [
817
+ {
818
+ "match": "\\b({{id}})\\.({{id}})\\s+({{id}})\\b",
819
+ "captures": {
820
+ "1": "storage.type.interface.systemverilog",
821
+ "2": "support.modport.systemverilog"
532
822
  }
533
823
  }
534
- },
535
- {
536
- "match": "\\s*\\b(local|const|protected|virtual|localparam|parameter)\\b",
537
- "captures": {
538
- "1": {
539
- "name": "keyword.other.systemverilog"
540
- }
824
+ ],
825
+ "module-binding": [
826
+ {
827
+ "match": "\\.({{id}})\\s*\\(",
828
+ "captures": {
829
+ "1": "support.function.port.systemverilog"
830
+ },
831
+ "push": "module-binding-signal"
832
+ },
833
+ {
834
+ "match": "\\w\\.({{id}})"
835
+ },
836
+ {
837
+ "match": "\\.({{id}})\\s*",
838
+ "scope": "support.function.port.implicit.systemverilog"
541
839
  }
542
- },
543
- {
544
- "match": "\\s*\\b(rand|randc)\\b",
545
- "name": "storage.type.rand.systemverilog"
546
- },
547
- {
548
- "begin": "^(\\s*(bind)\\s+([a-zA-Z_][\\w\\.]*))?\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=#[^#])",
549
- "beginCaptures": {
550
- "2": {
551
- "name": "keyword.control.systemverilog"
552
- },
553
- "4": {
554
- "name": "storage.module.systemverilog"
555
- }
840
+ ],
841
+ "module-binding-signal": [
842
+ {
843
+ "match": "\\(",
844
+ "push": "module-binding-signal"
556
845
  },
557
- "end": "(?=;|=|:)",
558
- "patterns": [
559
- {
560
- "include": "#module-binding"
561
- },
562
- {
563
- "include": "#module-param"
564
- },
565
- {
566
- "include": "#comments"
567
- },
568
- {
569
- "include": "#operators"
570
- },
571
- {
572
- "include": "#constants"
573
- },
574
- {
575
- "include": "#strings"
576
- },
577
- {
578
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(\\(|$))",
579
- "name": "entity.name.type.module.systemverilog"
580
- }
581
- ],
582
- "name": "meta.module.inst.param.systemverilog"
583
- },
584
- {
585
- "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*(\\(|$)",
586
- "beginCaptures": {
587
- "1": {
588
- "name": "storage.module.systemverilog"
589
- },
590
- "2": {
591
- "name": "entity.name.type.module.systemverilog"
592
- },
593
- "4": {
594
- "name": "constant.numeric.systemverilog"
595
- },
596
- "6": {
597
- "name": "constant.numeric.systemverilog"
598
- }
846
+ {
847
+ "match": "\\)",
848
+ "pop": true
599
849
  },
600
- "end": ";",
601
- "patterns": [
602
- {
603
- "include": "#module-binding"
604
- },
605
- {
606
- "include": "#comments"
607
- },
608
- {
609
- "include": "#strings"
610
- },
611
- {
612
- "include": "#operators"
613
- },
614
- {
615
- "include": "#constants"
850
+ {
851
+ "include": "constants"
852
+ },
853
+ {
854
+ "include": "comments"
855
+ },
856
+ {
857
+ "include": "operators"
858
+ },
859
+ {
860
+ "include": "strings"
861
+ },
862
+ {
863
+ "include": "constants"
864
+ },
865
+ {
866
+ "match": "\\b({{id}})(::)",
867
+ "captures": {
868
+ "1": "support.type.scope.systemverilog",
869
+ "2": "keyword.operator.scope.systemverilog"
616
870
  }
617
- ],
618
- "name": "meta.module.inst.systemverilog"
619
- },
620
- {
621
- "name": "meta.struct.assign.systemverilog",
622
- "begin": "\\b\\s+(<?=)\\s*(\\'{)",
623
- "beginCaptures": {
624
- "1": {
625
- "name": "keyword.operator.other.systemverilog"
626
- },
627
- "2": {
628
- "name": "keyword.operator.other.systemverilog"
629
- },
630
- "3": {
631
- "name": "keyword.operator.other.systemverilog"
871
+ },
872
+ {
873
+ "match": "\\b({{id}})(')",
874
+ "captures": {
875
+ "1": "storage.type.interface.systemverilog",
876
+ "2": "keyword.operator.cast.systemverilog"
632
877
  }
633
878
  },
634
- "end": ";",
635
- "patterns": [
636
- {
637
- "match": "\\b(\\w+)\\s*(:)(?!:)",
638
- "captures": {
639
- "1": {
640
- "name": "support.function.field.systemverilog"
641
- },
642
- "2": {
643
- "name": "keyword.operator.other.systemverilog"
644
- }
879
+ {
880
+ "match": "\\$\\b({{id}})\\b",
881
+ "scope": "support.function.systemverilog"
882
+ },
883
+ {
884
+ "match": "\\b(virtual)\\b",
885
+ "scope": "keyword.control.systemverilog"
886
+ }
887
+ ],
888
+ "module-param": [
889
+ {
890
+ "match": "(#)\\s*\\(",
891
+ "captures": {
892
+ "1": "keyword.operator.param.systemverilog"
893
+ },
894
+ "push": [
895
+ {
896
+ "meta_scope": "meta.module-param.systemverilog"
897
+ },
898
+ {
899
+ "match": "\\)",
900
+ "pop": true
901
+ },
902
+ {
903
+ "include": "comments"
904
+ },
905
+ {
906
+ "include": "constants"
907
+ },
908
+ {
909
+ "include": "operators"
910
+ },
911
+ {
912
+ "include": "strings"
913
+ },
914
+ {
915
+ "include": "module-binding"
916
+ },
917
+ {
918
+ "match": "\\b(virtual)\\b",
919
+ "scope": "keyword.control.systemverilog"
645
920
  }
646
- },
647
- {
648
- "include": "#comments"
649
- },
650
- {
651
- "include": "#strings"
652
- },
653
- {
654
- "include": "#operators"
655
- },
656
- {
657
- "include": "#constants"
658
- },
659
- {
660
- "include": "#storage-scope-systemverilog"
661
- }
662
- ]
663
- },
664
- {
665
- "include": "#storage-scope-systemverilog"
666
- },
667
- {
668
- "include": "#functions"
669
- },
670
- {
671
- "include": "#constants"
672
- }
673
- ],
674
- "repository": {
675
- "functions": {
676
- "match": "\\b(\\w+)(?=\\s*\\()",
677
- "name": "support.function.generic.systemverilog"
678
- },
679
- "all-types": {
680
- "patterns": [
681
- {
682
- "include": "#storage-type-systemverilog"
683
- },
684
- {
685
- "include": "#storage-modifier-systemverilog"
921
+ ]
922
+ }
923
+ ],
924
+ "operators": [
925
+ {
926
+ "match": "(==|===|!=|!==|<=|>=|<|>)",
927
+ "scope": "keyword.operator.comparison.systemverilog"
928
+ },
929
+ {
930
+ "match": "(=)",
931
+ "scope": "keyword.operator.assignment.systemverilog"
932
+ },
933
+ {
934
+ "match": "(\\-|\\+|\\*|\\/|<<|>>|%)",
935
+ "scope": "keyword.operator.arithmetic.systemverilog"
936
+ },
937
+ {
938
+ "match": "(!|&&|\\|\\||\\bor\\b)",
939
+ "scope": "keyword.operator.logical.systemverilog"
940
+ },
941
+ {
942
+ "match": "(&|\\||\\^|~)",
943
+ "scope": "keyword.operator.bitwise.systemverilog"
944
+ },
945
+ {
946
+ "match": "(\\{|'\\{|})",
947
+ "scope": "keyword.operator.array.systemverilog"
948
+ },
949
+ {
950
+ "match": "(\\?|:)",
951
+ "scope": "keyword.operator.ternary.systemverilog"
952
+ },
953
+ {
954
+ "match": "(#|@)",
955
+ "scope": "keyword.operator.other.systemverilog"
956
+ }
957
+ ],
958
+ "port-dir": [
959
+ {
960
+ "match": "\\s*\\b(output|input|inout|ref)\\s+(?:(var|wire)\\s+)?(?:({{id}})(::))?({{id}})?\\s+(?=\\[[\\w\\*\\(\\)\\/><\\:\\-\\+`\\$\\s]*\\]\\s+[a-zA-Z_][a-zA-Z0-9_\\s]*)",
961
+ "captures": {
962
+ "1": "support.type.systemverilog",
963
+ "2": "storage.type.net.systemverilog",
964
+ "3": "support.type.scope.systemverilog",
965
+ "4": "keyword.operator.scope.systemverilog",
966
+ "5": "storage.type.interface.systemverilog"
686
967
  }
687
- ]
688
- },
689
- "constants": {
690
- "patterns": [
691
- {
692
- "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)",
693
- "name": "constant.numeric.systemverilog"
694
- },
695
- {
696
- "match": "'[01xXzZ]",
697
- "name": "constant.numeric.bit.systemverilog"
698
- },
699
- {
700
- "match": "\\b((\\d[\\d_]*)(e|E)(\\+|-)?[0-9]+)\\b",
701
- "name": "constant.numeric.exp.systemverilog"
702
- },
703
- {
704
- "match": "\\b(\\d[\\d_]*)\\b",
705
- "name": "constant.numeric.decimal.systemverilog"
706
- },
707
- {
708
- "match": "\\b(\\d+(fs|ps|ns|us|ms|s)?)\\b",
709
- "name": "constant.numeric.time.systemverilog"
710
- },
711
- {
712
- "match": "\\b([A-Z][A-Z0-9_]*)\\b",
713
- "name": "constant.other.net.systemverilog"
714
- },
715
- {
716
- "match": "(`ifdef|`ifndef|`default_nettype)\\s+(\\w+)",
717
- "captures": {
718
- "1": {
719
- "name": "constant.other.preprocessor.systemverilog"
720
- },
721
- "2": {
722
- "name": "support.variable.systemverilog"
723
- }
724
- }
725
- },
726
- {
727
- "match": "`(celldefine|else|elsif|endcelldefine|endif|include|line|nounconnected_drive|resetall|timescale|unconnected_drive|undef|begin_\\w+|end_\\w+|remove_\\w+|restore_\\w+)\\b",
728
- "name": "constant.other.preprocessor.systemverilog"
729
- },
730
- {
731
- "match": "`\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
732
- "name": "constant.other.define.systemverilog"
733
- },
734
- {
735
- "match": "\\b(null)\\b",
736
- "name": "support.constant.systemverilog"
968
+ },
969
+ {
970
+ "match": "\\s*\\b(output|input|inout|ref)\\s+(?:(var|wire)\\s+)?(?:({{id}})(::))?({{id}})?\\s+(?=[a-zA-Z_][a-zA-Z0-9_\\s]*)",
971
+ "captures": {
972
+ "1": "support.type.systemverilog",
973
+ "2": "storage.type.net.systemverilog",
974
+ "3": "support.type.scope.systemverilog",
975
+ "4": "keyword.operator.scope.systemverilog",
976
+ "5": "storage.type.interface.systemverilog"
737
977
  }
738
- ]
739
- },
740
- "operators": {
741
- "patterns": [
742
- {
743
- "match": "(=|==|===|!=|!==|<=|>=|<|>)",
744
- "name": "keyword.operator.comparison.systemverilog"
745
- },
746
- {
747
- "match": "(\\-|\\+|\\*|\\/|%)",
748
- "name": "keyword.operator.arithmetic.systemverilog"
749
- },
750
- {
751
- "match": "(!|&&|\\|\\||\\bor\\b)",
752
- "name": "keyword.operator.logical.systemverilog"
753
- },
754
- {
755
- "match": "(&|\\||\\^|~|{|'{|}|<<|>>|\\?|:)",
756
- "name": "keyword.operator.bitwise.systemverilog"
757
- },
758
- {
759
- "match": "(#|@)",
760
- "name": "keyword.operator.other.systemverilog"
978
+ },
979
+ {
980
+ "match": "\\s*\\b(output|input|inout|ref)\\b",
981
+ "scope": "support.type.systemverilog"
982
+ },
983
+ {
984
+ "match": "\\$\\b({{id}})\\b",
985
+ "scope": "support.function.systemverilog"
986
+ }
987
+ ],
988
+ "storage-modifier-systemverilog": [
989
+ {
990
+ "match": "\\b(signed|unsigned|small|medium|large|supply[01]|strong[01]|pull[01]|weak[01]|highz[01])\\b",
991
+ "scope": "storage.modifier.systemverilog"
992
+ }
993
+ ],
994
+ "storage-scope-systemverilog": [
995
+ {
996
+ "match": "\\b({{id}})(::)",
997
+ "scope": "meta.scope.systemverilog",
998
+ "captures": {
999
+ "1": "support.type.scope.systemverilog",
1000
+ "2": "keyword.operator.scope.systemverilog"
761
1001
  }
762
- ]
763
- },
764
- "comments": {
765
- "patterns": [
766
- {
767
- "begin": "/\\*",
768
- "captures": {
769
- "0": {
770
- "name": "punctuation.definition.comment.systemverilog"
771
- }
772
- },
773
- "end": "\\*/",
774
- "name": "comment.block.systemverilog"
775
- },
776
- {
777
- "captures": {
778
- "1": {
779
- "name": "punctuation.definition.comment.systemverilog"
780
- }
1002
+ }
1003
+ ],
1004
+ "storage-type-systemverilog": [
1005
+ {
1006
+ "match": "\\s*\\b(tri|tri[01]|supply[01]|wand|triand|wor|trior|trireg|reg|integer|int|longint|shortint|logic|bit|byte|shortreal|chandle|string|time|realtime|real|process|void|event|semaphore|mailbox)\\b",
1007
+ "scope": "storage.type.systemverilog"
1008
+ },
1009
+ {
1010
+ "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",
1011
+ "scope": "storage.type.uvm.systemverilog"
1012
+ }
1013
+ ],
1014
+ "strings": [
1015
+ {
1016
+ "match": "\"",
1017
+ "captures": {
1018
+ "0": "punctuation.definition.string.begin.systemverilog"
1019
+ },
1020
+ "push": [
1021
+ {
1022
+ "meta_scope": "string.quoted.double.systemverilog"
781
1023
  },
782
- "match": "(//).*$\\n?",
783
- "name": "comment.line.double-slash.systemverilog"
784
- }
785
- ]
786
- },
787
- "port-dir": {
788
- "patterns": [
789
- {
790
- "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]*)",
791
- "captures": {
792
- "1": {
793
- "name": "support.type.systemverilog"
794
- },
795
- "3": {
796
- "name": "support.type.scope.systemverilog"
797
- },
798
- "4": {
799
- "name": "keyword.operator.scope.systemverilog"
1024
+ {
1025
+ "match": "\"",
1026
+ "captures": {
1027
+ "0": "punctuation.definition.string.end.systemverilog"
800
1028
  },
801
- "5": {
802
- "name": "storage.type.interface.systemverilog"
803
- }
1029
+ "pop": true
1030
+ },
1031
+ {
1032
+ "match": "\\\\.",
1033
+ "scope": "constant.character.escape.systemverilog"
1034
+ },
1035
+ {
1036
+ "match": "(?x)%\n(\\d+\\$)? # field (argument #)\n[#0\\- +']* # flags\n[,;:_]? # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[bdiouxXhHDOUeEfFgGaACcSspnmt%] # conversion type\n",
1037
+ "scope": "constant.other.placeholder.systemverilog"
1038
+ },
1039
+ {
1040
+ "match": "%",
1041
+ "scope": "invalid.illegal.placeholder.systemverilog"
804
1042
  }
805
- },
806
- {
807
- "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]*)",
808
- "captures": {
809
- "1": {
810
- "name": "support.type.systemverilog"
811
- },
812
- "3": {
813
- "name": "support.type.scope.systemverilog"
814
- },
815
- "4": {
816
- "name": "keyword.operator.scope.systemverilog"
817
- },
818
- "5": {
819
- "name": "storage.type.interface.systemverilog"
820
- }
1043
+ ]
1044
+ }
1045
+ ],
1046
+ "struct_decl": [
1047
+ {
1048
+ "match": "\\s*(\\bstruct\\b|\\bunion\\b|`\\w+)\\s*(packed)?\\s*",
1049
+ "captures": {
1050
+ "1": "keyword.control.systemverilog",
1051
+ "2": "keyword.control.systemverilog"
1052
+ },
1053
+ "set": [
1054
+ {
1055
+ "match": "\\bpacked\\b",
1056
+ "scope": "keyword.control.systemverilog"
1057
+ },
1058
+ {
1059
+ "meta_scope": "meta.struct.anonymous.systemverilog"
1060
+ },
1061
+ {
1062
+ "match": "}",
1063
+ "scope": "keyword.operator.other.systemverilog",
1064
+ "pop": true
1065
+ },
1066
+ {
1067
+ "include": "base-grammar"
821
1068
  }
822
- },
823
- {
824
- "match": "\\s*\\b(output|input|inout|ref)\\b",
825
- "name": "support.type.systemverilog"
826
- }
827
- ]
828
- },
829
- "base-grammar": {
830
- "patterns": [
831
- {
832
- "include": "#all-types"
833
- },
834
- {
835
- "include": "#comments"
836
- },
837
- {
838
- "include": "#operators"
839
- },
840
- {
841
- "include": "#constants"
842
- },
843
- {
844
- "include": "#strings"
845
- },
846
- {
847
- "match": "^\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s+[a-zA-Z_][a-zA-Z0-9_,=\\s]*",
848
- "captures": {
849
- "1": {
850
- "name": "storage.type.interface.systemverilog"
851
- }
1069
+ ]
1070
+ }
1071
+ ],
1072
+ "typedef_decl": [
1073
+ {
1074
+ "include": "struct_decl"
1075
+ },
1076
+ {
1077
+ "include": "comments"
1078
+ },
1079
+ {
1080
+ "match": "\\b(virtual|interface)\\b",
1081
+ "scope": "keyword.control.systemverilog"
1082
+ },
1083
+ {
1084
+ "match": "\\bclass\\b",
1085
+ "scope": "keyword.control.systemverilog",
1086
+ "pop": true
1087
+ },
1088
+ {
1089
+ "match": "\\benum\\b",
1090
+ "scope": "keyword.control.systemverilog",
1091
+ "set": [
1092
+ {
1093
+ "meta_scope": "meta.typedef_decl.enum"
1094
+ },
1095
+ {
1096
+ "match": "\\b{{id}}\\b",
1097
+ "scope": "storage.type.systemverilog",
1098
+ "set": [
1099
+ {
1100
+ "meta_scope": "meta.typedef_decl.enum.list"
1101
+ },
1102
+ {
1103
+ "match": "}",
1104
+ "scope": "keyword.operator.other.systemverilog",
1105
+ "pop": true
1106
+ },
1107
+ {
1108
+ "include": "base-grammar"
1109
+ }
1110
+ ]
1111
+ },
1112
+ {
1113
+ "match": "{",
1114
+ "scope": "keyword.operator.other.systemverilog",
1115
+ "set": [
1116
+ {
1117
+ "match": "}",
1118
+ "scope": "keyword.operator.other.systemverilog",
1119
+ "pop": true
1120
+ },
1121
+ {
1122
+ "include": "comments"
1123
+ },
1124
+ {
1125
+ "include": "constants"
1126
+ },
1127
+ {
1128
+ "include": "operators"
1129
+ },
1130
+ {
1131
+ "include": "strings"
1132
+ }
1133
+ ]
852
1134
  }
853
- },
854
- {
855
- "include": "#storage-scope-systemverilog"
856
- }
857
- ]
858
- },
859
- "storage-type-systemverilog": {
860
- "patterns": [
861
- {
862
- "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",
863
- "name": "storage.type.systemverilog"
864
- },
865
- {
866
- "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",
867
- "name": "storage.type.uvm.systemverilog"
868
- }
869
- ]
870
- },
871
- "storage-scope-systemverilog": {
872
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(::)",
873
- "captures": {
874
- "1": {
875
- "name": "support.type.systemverilog"
876
- },
877
- "2": {
878
- "name": "keyword.operator.scope.systemverilog"
879
- }
1135
+ ]
880
1136
  },
881
- "name": "meta.scope.systemverilog"
882
- },
883
- "storage-modifier-systemverilog": {
884
- "match": "\\b(signed|unsigned|small|medium|large|supply[01]|strong[01]|pull[01]|weak[01]|highz[01])\\b",
885
- "name": "storage.modifier.systemverilog"
886
- },
887
- "ifmodport": {
888
- "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",
889
- "captures": {
890
- "1": {
891
- "name": "storage.type.interface.systemverilog"
892
- },
893
- "2": {
894
- "name": "support.modport.systemverilog"
895
- }
1137
+ {
1138
+ "match": "\\b{{id}}\\b",
1139
+ "scope": "storage.type.systemverilog",
1140
+ "pop": true
896
1141
  }
897
- },
898
- "strings": {
899
- "patterns": [
900
- {
901
- "begin": "\"",
902
- "beginCaptures": {
903
- "0": {
904
- "name": "punctuation.definition.string.begin.systemverilog"
905
- }
1142
+ ],
1143
+ "typedef_symbol": [
1144
+ {
1145
+ "meta_scope": "meta.typedef_symbol"
1146
+ },
1147
+ {
1148
+ "match": ";",
1149
+ "pop": true
1150
+ },
1151
+ {
1152
+ "match": "\\[",
1153
+ "push": [
1154
+ {
1155
+ "meta_scope": "inside_bracket"
906
1156
  },
907
- "end": "\"",
908
- "endCaptures": {
909
- "0": {
910
- "name": "punctuation.definition.string.end.systemverilog"
911
- }
1157
+ {
1158
+ "match": "\\]",
1159
+ "pop": true
912
1160
  },
913
- "name": "string.quoted.double.systemverilog",
914
- "patterns": [
915
- {
916
- "match": "\\\\.",
917
- "name": "constant.character.escape.systemverilog"
918
- },
919
- {
920
- "match": "(?x)%\r\n\t\t\t\t\t\t\t\t\t\t(\\d+\\$)? # field (argument #)\r\n\t\t\t\t\t\t\t\t\t\t[#0\\- +']* # flags\r\n\t\t\t\t\t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\r\n\t\t\t\t\t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\r\n\t\t\t\t\t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\r\n\t\t\t\t\t\t\t\t\t\t(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\r\n\t\t\t\t\t\t\t\t\t\t[bdiouxXhHDOUeEfFgGaACcSspnmt%] # conversion type\r\n\t\t\t\t\t\t\t\t\t",
921
- "name": "constant.other.placeholder.systemverilog"
922
- },
923
- {
924
- "match": "%",
925
- "name": "invalid.illegal.placeholder.systemverilog"
926
- }
927
- ]
928
- }
929
- ]
930
- },
931
- "module-binding": {
932
- "begin": "\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\(",
933
- "beginCaptures": {
934
- "1": {
935
- "name": "support.function.port.systemverilog"
936
- }
937
- },
938
- "end": "\\)",
939
- "patterns": [
940
- {
941
- "include": "#constants"
942
- },
943
- {
944
- "include": "#comments"
945
- },
946
- {
947
- "include": "#operators"
948
- },
949
- {
950
- "include": "#strings"
951
- },
952
- {
953
- "include": "#constants"
954
- },
955
- {
956
- "match": "\\b([a-zA-Z_]\\w*)(::)",
957
- "captures": {
958
- "1": {
959
- "name": "support.type.scope.systemverilog"
960
- },
961
- "2": {
962
- "name": "keyword.operator.scope.systemverilog"
963
- }
964
- }
965
- },
966
- {
967
- "match": "\\b([a-zA-Z_]\\w*)(')",
968
- "captures": {
969
- "1": {
970
- "name": "storage.type.interface.systemverilog"
971
- },
972
- "2": {
973
- "name": "keyword.operator.cast.systemverilog"
974
- }
1161
+ {
1162
+ "include": "comments"
1163
+ },
1164
+ {
1165
+ "include": "constants"
1166
+ },
1167
+ {
1168
+ "include": "operators"
1169
+ },
1170
+ {
1171
+ "include": "strings"
975
1172
  }
976
- },
977
- {
978
- "match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
979
- "name": "support.function.systemverilog"
980
- },
981
- {
982
- "match": "\\b(virtual)\\b",
983
- "name": "keyword.control.systemverilog"
984
- }
985
- ],
986
- "match": "\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*",
987
- "captures": {
988
- "1": {
989
- "name": "support.function.port.implicit.systemverilog"
990
- }
991
- }
992
- },
993
- "module-param": {
994
- "name": "meta.module-param.systemverilog",
995
- "begin": "(#)\\s*\\(",
996
- "beginCaptures": {
997
- "1": {
998
- "name": "keyword.operator.param.systemverilog"
999
- }
1173
+ ]
1000
1174
  },
1001
- "end": "\\)",
1002
- "patterns": [
1003
- {
1004
- "include": "#comments"
1005
- },
1006
- {
1007
- "include": "#constants"
1008
- },
1009
- {
1010
- "include": "#operators"
1011
- },
1012
- {
1013
- "include": "#strings"
1014
- },
1015
- {
1016
- "include": "#module-binding"
1017
- },
1018
- {
1019
- "match": "\\b(virtual)\\b",
1020
- "name": "keyword.control.systemverilog"
1021
- }
1022
- ]
1023
- },
1024
- "struct-anonymous": {
1025
- "begin": "\\s*\\b(struct|union)\\s*(packed)?\\s*",
1026
- "beginCaptures": {
1027
- "1": {
1028
- "name": "keyword.control.systemverilog"
1029
- },
1030
- "2": {
1031
- "name": "keyword.control.systemverilog"
1032
- }
1175
+ {
1176
+ "include": "module-param"
1033
1177
  },
1034
- "end": "(})\\s*([a-zA-Z_]\\w*)\\s*;",
1035
- "endCaptures": {
1036
- "1": {
1037
- "name": "keyword.operator.other.systemverilog"
1038
- }
1178
+ {
1179
+ "match": "\\b(signed|unsigned)\\b",
1180
+ "scope": "storage.modifier.systemverilog"
1039
1181
  },
1040
- "patterns": [
1041
- {
1042
- "include": "#base-grammar"
1043
- }
1044
- ],
1045
- "name": "meta.struct.anonymous.systemverilog"
1046
- }
1047
- },
1048
- "scopeName": "source.systemverilog",
1049
- "uuid": "789be04c-8b74-352e-8f37-63d336001277"
1182
+ {
1183
+ "match": "\\b({{id}})\\b",
1184
+ "scope": "entity.name.type.systemverilog",
1185
+ "pop": true
1186
+ },
1187
+ {
1188
+ "match": "\\s*\\b(typedef)\\b",
1189
+ "captures": {
1190
+ "1": "keyword.control.systemverilog"
1191
+ },
1192
+ "set": [
1193
+ "typedef_symbol",
1194
+ "typedef_decl"
1195
+ ]
1196
+ }
1197
+ ]
1198
+ }
1050
1199
  }