This commit is contained in:
Folkert 2021-02-23 15:05:25 +01:00
parent 4eea0aff7a
commit 9d9316d170
2 changed files with 76 additions and 34 deletions

View file

@ -378,6 +378,7 @@ pub enum EExpr<'a> {
Space(BadInputError, Row, Col),
When(When<'a>, Row, Col),
If(If<'a>, Row, Col),
Lambda(ELambda<'a>, Row, Col),
@ -426,6 +427,25 @@ pub enum When<'a> {
PatternAlignment(u16, Row, Col),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum If<'a> {
Space(BadInputError, Row, Col),
If(Row, Col),
Then(Row, Col),
Else(Row, Col),
// TODO make EEXpr
Condition(&'a EExpr<'a>, Row, Col),
ThenBranch(&'a EExpr<'a>, Row, Col),
ElseBranch(&'a EExpr<'a>, Row, Col),
Syntax(&'a SyntaxError<'a>, Row, Col),
IndentCondition(Row, Col),
IndentThen(Row, Col),
IndentElse(Row, Col),
PatternAlignment(u16, Row, Col),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum EPattern<'a> {
Record(PRecord<'a>, Row, Col),