Fix constant definition parser.
Wouldn't allow a proper sequence of results. Now it does.
This commit is contained in:
parent
a909e9eb0a
commit
71f90ad49f
|
@ -14,8 +14,10 @@ pub fn parser() -> impl Parser<Token, ast::UntypedDefinition, Error = ParseError
|
||||||
.or_not(),
|
.or_not(),
|
||||||
)
|
)
|
||||||
.then_ignore(just(Token::Equal))
|
.then_ignore(just(Token::Equal))
|
||||||
.then(recursive(|expression| {
|
.then(recursive(|sequence| {
|
||||||
recursive(|sequence| pure_expression(sequence, expression))
|
recursive(|expression| pure_expression(sequence.clone(), expression))
|
||||||
|
.then(sequence.repeated())
|
||||||
|
.foldl(|current, next| current.append_in_sequence(next))
|
||||||
}))
|
}))
|
||||||
.map_with_span(|(((public, name), annotation), value), span| {
|
.map_with_span(|(((public, name), annotation), value), span| {
|
||||||
ast::UntypedDefinition::ModuleConstant(ast::ModuleConstant {
|
ast::UntypedDefinition::ModuleConstant(ast::ModuleConstant {
|
||||||
|
|
Loading…
Reference in New Issue