Skip to content

Commit

Permalink
Merge pull request #1095 from taichi-ishitani/support_width_cast
Browse files Browse the repository at this point in the history
Support width cast
  • Loading branch information
dalance authored Nov 25, 2024
2 parents b7aa9e2 + fb4ab26 commit 2f73427
Show file tree
Hide file tree
Showing 10 changed files with 7,976 additions and 7,848 deletions.
16 changes: 13 additions & 3 deletions crates/emitter/src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,14 @@ impl VerylWalker for Emitter {
self.user_defined_type(&x.user_defined_type);
self.str("'(");
}
CastingType::Based(x) => {
self.based(&x.based);
self.str("'(");
}
CastingType::BaseLess(x) => {
self.base_less(&x.base_less);
self.str("'(");
}
// casting to clock type doesn't change polarity
CastingType::Clock(_)
| CastingType::ClockPosedge(_)
Expand Down Expand Up @@ -1350,9 +1358,11 @@ impl VerylWalker for Emitter {
| CastingType::U64(_)
| CastingType::I32(_)
| CastingType::I64(_) => self.str("))"),
CastingType::F32(_) | CastingType::F64(_) | CastingType::UserDefinedType(_) => {
self.str(")")
}
CastingType::F32(_)
| CastingType::F64(_)
| CastingType::UserDefinedType(_)
| CastingType::Based(_)
| CastingType::BaseLess(_) => self.str(")"),
_ => (),
}
}
Expand Down
820 changes: 411 additions & 409 deletions crates/parser/src/generated/veryl-exp.par

Large diffs are not rendered by default.

Loading

0 comments on commit 2f73427

Please sign in to comment.