diff --git a/compiler/cl-parser/src/parser.rs b/compiler/cl-parser/src/parser.rs index abf5292..177f58f 100644 --- a/compiler/cl-parser/src/parser.rs +++ b/compiler/cl-parser/src/parser.rs @@ -1101,13 +1101,14 @@ impl Parse<'_> for Match { /// [Match] = `match` [Expr] `{` [MatchArm],* `}` fn parse(p: &mut Parser<'_>) -> PResult { p.match_type(TokenKind::Match, Parsing::Match)?; - let scrutinee = condition(p)?.into(); - let arms = delim( - sep(MatchArm::parse, TokenKind::Comma, CURLIES.1, Parsing::Match), - CURLIES, - Parsing::Match, - )(p)?; - Ok(Match { scrutinee, arms }) + Ok(Match { + scrutinee: condition(p)?.into(), + arms: delim( + sep(MatchArm::parse, TokenKind::Comma, CURLIES.1, Parsing::Match), + CURLIES, + Parsing::Match, + )(p)?, + }) } }