refactor type in parens

This commit is contained in:
Folkert 2021-02-11 20:27:21 +01:00
parent cc81c6e5ba
commit f6d3b4ed93
2 changed files with 37 additions and 9 deletions

View file

@ -370,6 +370,7 @@ pub type Col = u16;
pub enum Type<'a> {
TRecord(TRecord<'a>, Row, Col),
TTagUnion(TTagUnion<'a>, Row, Col),
TInParens(TInParens<'a>, Row, Col),
///
TStart(Row, Col),
TSpace(Row, Col),
@ -416,6 +417,23 @@ pub enum TTagUnion<'a> {
IndentEnd(Row, Col),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum TInParens<'a> {
End(Row, Col),
Open(Row, Col),
///
Type(&'a Type<'a>, Row, Col),
// TODO REMOVE in favor of Type
Syntax(&'a SyntaxError<'a>, Row, Col),
///
Space(BadInputError, Row, Col),
///
IndentOpen(Row, Col),
IndentEnd(Row, Col),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ContextStack<'a> {
Cons(ContextItem, &'a ContextStack<'a>),