Skip to content

Commit

Permalink
Merge pull request #1135 from taichi-ishitani/remove_trading_comma_fr…
Browse files Browse the repository at this point in the history
…om_concacation

Remove trailing comma from concatenation and array literal
  • Loading branch information
dalance authored Dec 9, 2024
2 parents 3016778 + 48a2b51 commit b200061
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
6 changes: 0 additions & 6 deletions crates/emitter/src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1419,9 +1419,6 @@ impl VerylWalker for Emitter {
self.space(1);
self.concatenation_item(&x.concatenation_item);
}
if let Some(ref x) = arg.concatenation_list_opt {
self.comma(&x.comma);
}
}

/// Semantic action for non-terminal 'ConcatenationItem'
Expand All @@ -1446,9 +1443,6 @@ impl VerylWalker for Emitter {
self.space(1);
self.array_literal_item(&x.array_literal_item);
}
if let Some(ref x) = arg.array_literal_list_opt {
self.comma(&x.comma);
}
}

/// Semantic action for non-terminal 'ArrayLiteralItem'
Expand Down
2 changes: 1 addition & 1 deletion testcases/map/testcases/sv/18_concatenation.sv.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion testcases/map/testcases/sv/51_array_literal.sv.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion testcases/veryl/18_concatenation.veryl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module Module18 {
var b: logic;
let c: logic = 1;

assign a = {a[10:0], c};
assign a = {a[10:0], c,};
assign b = {a[10:0] repeat 10, c repeat 4};
}
2 changes: 1 addition & 1 deletion testcases/veryl/51_array_literal.veryl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Module51 {
let _a: logic [2] = '{1, 1};
let _a: logic [2] = '{1, 1,};
let _b: logic [2] = '{1 repeat 2};
let _c: logic [2] = '{default: 1};
}

0 comments on commit b200061

Please sign in to comment.