mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-04-20 03:03:25 -04:00
Optional trailing comma for match arms.
This commit is contained in:
@@ -357,7 +357,12 @@ PublicReference: String = {
|
||||
}
|
||||
|
||||
MatchExpression: Box<Expression> = {
|
||||
"match" <BoxedExpression> "{" <(<MatchArm> ",")*> "}" => Box::new(Expression::MatchExpression(<>))
|
||||
"match" <BoxedExpression> "{" <MatchArms> "}" => Box::new(Expression::MatchExpression(<>))
|
||||
}
|
||||
|
||||
MatchArms: Vec<(Option<Expression>, Expression)> = {
|
||||
=> vec![],
|
||||
<mut list:( <MatchArm> "," )*> <end:MatchArm> ","? => { list.push(end); list }
|
||||
}
|
||||
|
||||
MatchArm: (Option<Expression>, Expression) = {
|
||||
|
||||
Reference in New Issue
Block a user