Skip to content

Commit

Permalink
fix invoke-with parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
rachitnigam committed Oct 6, 2021
1 parent cbabb80 commit 1cb6c29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion calyx/src/frontend/syntax.pest
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ enable = { at_attributes ~ identifier ~ ";" }

invoke_arg = { identifier ~ "=" ~ (port | num_lit) }
invoke_args = { (invoke_arg ~ ("," ~ invoke_arg)*)? }
invoke = { at_attributes ~ "invoke" ~ identifier ~ "(" ~ invoke_args ~ ")" ~ "(" ~ invoke_args ~ ")" ~ ("with" ~ identifier) ~ ";" }
invoke = { at_attributes ~ "invoke" ~ identifier ~ "(" ~ invoke_args ~ ")" ~ "(" ~ invoke_args ~ ")" ~ ("with" ~ identifier)? ~ ";" }

seq = {
at_attributes ~ "seq" ~ "{"
Expand Down
4 changes: 2 additions & 2 deletions calyx/src/ir/printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ impl IRPrinter {
write!(f, "\n{})", " ".repeat(indent_level))?;
}
if let Some(group) = comb_group {
writeln!(f, "with {}", group.borrow().name)
writeln!(f, "with {};", group.borrow().name)
} else {
writeln!(f)
writeln!(f, ";")
}
}
ir::Control::Seq(ir::Seq { stmts, attributes }) => {
Expand Down

0 comments on commit 1cb6c29

Please sign in to comment.