Skip to content

Commit

Permalink
Add packed to struct #118
Browse files Browse the repository at this point in the history
  • Loading branch information
dalance committed Feb 6, 2023
1 parent db16ae5 commit 434879b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions crates/emitter/src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,8 @@ impl VerylWalker for Emitter {
self.space(1);
self.r#struct(&arg.r#struct);
self.space(1);
self.str("packed");
self.space(1);
self.token_will_push(&arg.l_brace.l_brace_token);
self.newline_push();
self.struct_list(&arg.struct_list);
Expand Down
2 changes: 1 addition & 1 deletion testcases/sv/09_struct_enum.sv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module veryl_testcase_Module09;
// struct declaration
typedef struct {
typedef struct packed {
logic [10-1:0] a ;
logic [10-1:0] aa ;
int unsigned aaa;
Expand Down
2 changes: 1 addition & 1 deletion testcases/sv/17_package.sv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package veryl_testcase_Package17;
logic _b;

// struct declaration
typedef struct {
typedef struct packed {
logic [10-1:0] a ;
logic [10-1:0] aa ;
int unsigned aaa;
Expand Down

0 comments on commit 434879b

Please sign in to comment.