Skip to content

Commit

Permalink
Add type cast #48
Browse files Browse the repository at this point in the history
  • Loading branch information
dalance committed Jan 16, 2023
1 parent 5aebac7 commit 6d266b6
Show file tree
Hide file tree
Showing 11 changed files with 16,508 additions and 15,839 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* [Changed] modport separator from `.` to `::` [#65](https://github.com/dalance/veryl/issues/65)
* [Changed] `[package]` in Veryl.toml to `[project]` [#82](https://github.com/dalance/veryl/issues/82)
* [Added] type cast [#48](https://github.com/dalance/veryl/issues/48)

## [v0.1.14](https://github.com/dalance/veryl/compare/v0.1.13...v0.1.14) - 2023-01-12

Expand Down
12 changes: 12 additions & 0 deletions crates/emitter/src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,18 @@ impl VerylWalker for Emitter {
}
}

/// Semantic action for non-terminal 'Expression11'
fn expression11(&mut self, arg: &Expression11) {
for x in &arg.expression11_list {
self.scoped_identifier(&x.scoped_identifier);
self.str("'(");
}
self.expression12(&arg.expression12);
for _ in &arg.expression11_list {
self.str(")");
}
}

/// Semantic action for non-terminal 'FunctionCallArg'
fn function_call_arg(&mut self, arg: &FunctionCallArg) {
self.expression(&arg.expression);
Expand Down
11 changes: 11 additions & 0 deletions crates/formatter/src/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,17 @@ impl VerylWalker for Formatter {
}
}

/// Semantic action for non-terminal 'Expression11'
fn expression11(&mut self, arg: &Expression11) {
self.expression12(&arg.expression12);
for x in &arg.expression11_list {
self.space(1);
self.r#as(&x.r#as);
self.space(1);
self.scoped_identifier(&x.scoped_identifier);
}
}

/// Semantic action for non-terminal 'FunctionCallArg'
fn function_call_arg(&mut self, arg: &FunctionCallArg) {
self.expression(&arg.expression);
Expand Down
1,188 changes: 597 additions & 591 deletions crates/parser/src/generated/veryl-exp.par

Large diffs are not rendered by default.

Loading

0 comments on commit 6d266b6

Please sign in to comment.