Fix constructor parsing

main
Alex Bethel 2022-08-10 14:21:15 -05:00
parent a88a037495
commit 8b36fe67f1
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ fn parse_type_def(m: &ParserMeta) -> impl Parser<char, Statement, Error = Simple
pad(keyword("data"))
.ignore_then(parse_type(m))
.then_ignore(pad(just('=')))
.then(parse_constructor(m).repeated())
.then(parse_constructor(m).separated_by(pad(just('|'))))
.then_ignore(pad(just(';')))
.map(|(typ, constructors)| Statement::TypeDefinition { typ, constructors })
}