refactor parse AST to allow multiple if branches

This commit is contained in:
Folkert 2021-02-23 14:31:48 +01:00
parent c208f500d9
commit 4eea0aff7a
6 changed files with 145 additions and 109 deletions

View file

@ -127,7 +127,7 @@ pub enum Expr<'a> {
UnaryOp(&'a Loc<Expr<'a>>, Loc<UnaryOp>),
// Conditionals
If(&'a Loc<Expr<'a>>, &'a Loc<Expr<'a>>, &'a Loc<Expr<'a>>),
If(&'a [(Loc<Expr<'a>>, Loc<Expr<'a>>)], &'a Loc<Expr<'a>>),
When(
/// The condition
&'a Loc<Expr<'a>>,