diff --git a/air-script/tests/selectors/selectors.air b/air-script/tests/selectors/selectors.air index 94ec3653..d5ecf3cc 100644 --- a/air-script/tests/selectors/selectors.air +++ b/air-script/tests/selectors/selectors.air @@ -15,7 +15,7 @@ boundary_constraints { integrity_constraints { enf clk' = 0 when s[0] & !s[1]; enf match { - case s[0] & s[1] & s[2]: clk' = clk - case !s[1] & !s[2]: clk' = 1 + case s[0] & s[1] & s[2]: clk' = clk, + case !s[1] & !s[2]: clk' = 1, }; } \ No newline at end of file diff --git a/air-script/tests/selectors/selectors_with_evaluators.air b/air-script/tests/selectors/selectors_with_evaluators.air index 607ada46..2510c885 100644 --- a/air-script/tests/selectors/selectors_with_evaluators.air +++ b/air-script/tests/selectors/selectors_with_evaluators.air @@ -27,7 +27,7 @@ boundary_constraints { integrity_constraints { enf next_is_zero([clk]) when s[0] & !s[1]; enf match { - case s[1] & s[2]: is_unchanged([clk, s[0]]) - case !s[1] & !s[2]: next_is_one([clk]) + case s[1] & s[2]: is_unchanged([clk, s[0]]), + case !s[1] & !s[2]: next_is_one([clk]), }; } \ No newline at end of file diff --git a/ir/src/tests/selectors.rs b/ir/src/tests/selectors.rs index 69c8458f..6cb97a7b 100644 --- a/ir/src/tests/selectors.rs +++ b/ir/src/tests/selectors.rs @@ -61,8 +61,8 @@ fn multiconstraint_selectors() { integrity_constraints { enf clk' = 0 when s[0] & !s[1]; enf match { - case s[0] & s[1]: clk' = clk - case !s[0] & !s[1]: clk' = 1 + case s[0] & s[1]: clk' = clk, + case !s[0] & !s[1]: clk' = 1, }; }"; @@ -181,8 +181,8 @@ fn selectors_inside_match() { integrity_constraints { enf next_is_zero([clk]) when s[0] & !s[1]; enf match { - case s[1] & s[2]: is_unchanged([clk, s[0]]) - case !s[1] & !s[2]: next_is_one([clk]) + case s[1] & s[2]: is_unchanged([clk, s[0]]), + case !s[1] & !s[2]: next_is_one([clk]), }; }"; diff --git a/parser/src/parser/grammar.lalrpop b/parser/src/parser/grammar.lalrpop index c7669bc0..6d1a21bb 100644 --- a/parser/src/parser/grammar.lalrpop +++ b/parser/src/parser/grammar.lalrpop @@ -347,7 +347,7 @@ ReturnStatement: Expr = { } MatchArm: Statement = { - "case" ":" => { + "case" ":" "," => { let generated_name = format!("%{}", *next_var); *next_var += 1; let generated_binding = Identifier::new(SourceSpan::UNKNOWN, Symbol::intern(generated_name)); diff --git a/parser/src/parser/tests/inlining.rs b/parser/src/parser/tests/inlining.rs index d6c7670f..c193bc6a 100644 --- a/parser/src/parser/tests/inlining.rs +++ b/parser/src/parser/tests/inlining.rs @@ -1322,8 +1322,8 @@ fn test_repro_issue340() { enf instruction_word = word_sum; enf match { - case s: imm_reconstruction([instruction_bits, immediate]) - case !s: immediate = 0 + case s: imm_reconstruction([instruction_bits, immediate]), + case !s: immediate = 0, }; } diff --git a/parser/src/parser/tests/integrity_constraints.rs b/parser/src/parser/tests/integrity_constraints.rs index b8707a73..85b754e3 100644 --- a/parser/src/parser/tests/integrity_constraints.rs +++ b/parser/src/parser/tests/integrity_constraints.rs @@ -667,8 +667,8 @@ fn ic_match_constraint() { integrity_constraints { enf match { - case s[0] & s[1]: is_binary([c[0]]) - case s[0]: c[1] = c[2] + case s[0] & s[1]: is_binary([c[0]]), + case s[0]: c[1] = c[2], }; }";