File tree Expand file tree Collapse file tree 4 files changed +28
-1
lines changed Expand file tree Collapse file tree 4 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
12
12
### Added
13
13
- added compile-if and pools scope
14
+ - added typedef
14
15
15
16
## [ 1.0.2] - 2023-02-17
16
17
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ contexts:
59
59
- include : compile-if
60
60
- include : actions
61
61
- include : enum-declaration
62
+ - include : typedef-declaration
62
63
- include : function-declaration
63
64
- include : components
64
65
- include : structs
@@ -380,13 +381,32 @@ contexts:
380
381
- include : code
381
382
382
383
# B.13 Data Types
384
+ # enum
383
385
enum-declaration :
384
386
- match : \b(enum)\s+\b{{valid_name}}\b
385
387
captures :
386
388
1 : keyword.declaration.enum.pss
387
389
2 : storage.type.pss
388
390
push : enum-values-declaration
389
391
392
+ # typedef
393
+ typedef-declaration :
394
+ # scalars
395
+ - match : ' ^\s*(typedef)\s+\b(?:{{valid_scalar_type}})\s+(?:{{valid_id}}\s*)(;|\=)'
396
+ captures :
397
+ 1 : keyword.declaration.type.pss
398
+ 2 : storage.type.pss
399
+ 3 : storage.modifier.range.pss
400
+ 4 : storage.type.pss
401
+ 5 : punctuation.terminator.pss
402
+ # other types
403
+ - match : ' ^\s*(typedef)\s+\b(?:{{valid_name}})\s+(?:{{valid_id}}\s*)(;|\=)'
404
+ captures :
405
+ 1 : keyword.declaration.type.pss
406
+ 2 : storage.type.pss
407
+ 3 : storage.type.pss
408
+ 4 : punctuation.terminator.pss
409
+
390
410
enum-values-declaration :
391
411
- meta_content_scope : meta.type.enum.pss
392
412
- match : (\{)
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ extend buffer sml_data_buff {
61
61
constraint mem_seg.size in [1..4];
62
62
}
63
63
64
- buffer foo : bla_pkg:foo_base {
64
+ buffer foo : bla_pkg:: foo_base {
65
65
66
66
}
67
67
Original file line number Diff line number Diff line change @@ -20,6 +20,12 @@ enum numbering_e
20
20
ONCE, TWICE
21
21
}
22
22
23
+ typedef int xyz;
24
+
25
+ typedef bit[8*16:1] rs_demo_string_t;
26
+
27
+ typedef my_pkg::my_component comp_t;
28
+
23
29
component x2 {
24
30
resource channel_r {};
25
31
pool [3] channel_r channel_p;
You can’t perform that action at this time.
0 commit comments