Skip to content

Commit

Permalink
feat: Allow empty (begin ..) (#289)
Browse files Browse the repository at this point in the history
This adjusts the minimum expected arity for `begin` statements to allow
them to be empty. The reason for this is that, in practice, we may have
a `begin` statement stuffed only with `debug` constraints (which are
physically removed unless the `--debug` switch is provided).
  • Loading branch information
DavePearce authored Nov 4, 2024
1 parent 2a9a1d1 commit b292759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl FuncVerifier<Node> for Intrinsic {
Intrinsic::Neg => Arity::Monadic,
Intrinsic::Inv => Arity::Monadic,
Intrinsic::Normalize => Arity::Monadic,
Intrinsic::Begin => Arity::AtLeast(1),
Intrinsic::Begin => Arity::AtLeast(0),
Intrinsic::IfZero | Intrinsic::IfNotZero => Arity::Between(2, 3),
}
}
Expand Down

0 comments on commit b292759

Please sign in to comment.