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

@ -411,6 +411,8 @@ pub enum EExpr<'a> {
When(When<'a>, Row, Col),
If(If<'a>, Row, Col),
Expect(Expect<'a>, Row, Col),
Lambda(ELambda<'a>, Row, Col),
Underscore(Row, Col),
@ -553,6 +555,15 @@ pub enum If<'a> {
IndentElseBranch(Row, Col),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Expect<'a> {
Space(BadInputError, Row, Col),
Expect(Row, Col),
Condition(&'a EExpr<'a>, Row, Col),
Continuation(&'a EExpr<'a>, Row, Col),
IndentCondition(Row, Col),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum EPattern<'a> {
Record(PRecord<'a>, Row, Col),