parse expect

This commit is contained in:
Folkert 2021-04-22 23:00:44 +02:00
parent 50942325b9
commit 700e7d9686
12 changed files with 223 additions and 5 deletions

View file

@ -126,6 +126,7 @@ pub enum Expr<'a> {
/// Multiple defs in a row
Defs(&'a [&'a Loc<Def<'a>>], &'a Loc<Expr<'a>>),
Backpassing(&'a [Loc<Pattern<'a>>], &'a Loc<Expr<'a>>, &'a Loc<Expr<'a>>),
Expect(&'a Loc<Expr<'a>>, &'a Loc<Expr<'a>>),
// Application
/// To apply by name, do Apply(Var(...), ...)
@ -201,6 +202,8 @@ pub enum Def<'a> {
body_expr: &'a Loc<Expr<'a>>,
},
Expect(&'a Loc<Expr<'a>>),
// Blank Space (e.g. comments, spaces, newlines) before or after a def.
// We preserve this for the formatter; canonicalization ignores it.
SpaceBefore(&'a Def<'a>, &'a [CommentOrNewline<'a>]),