1
1
Fork 0
mirror of https://github.com/azur1s/bobbylisp.git synced 2024-10-16 02:37:40 -05:00

removed semicolons (if)

This commit is contained in:
Natapat Samutpong 2022-04-01 15:16:11 +07:00
parent 961b0ff130
commit 6b984f8711

View file

@ -277,7 +277,6 @@ fn expr_parser() -> impl Parser<Token, Vec<Spanned<Expr>>, Error = Simple<Token>
}); });
let do_block = expr.clone() let do_block = expr.clone()
.then_ignore(just(Token::SemiColon))
.repeated() .repeated()
.delimited_by( .delimited_by(
just(Token::KwDo), just(Token::KwDo),
@ -299,13 +298,13 @@ fn expr_parser() -> impl Parser<Token, Vec<Spanned<Expr>>, Error = Simple<Token>
.then( .then(
do_block.clone() do_block.clone()
.or(expr.clone()) .or(expr.clone())
).then_ignore(just(Token::SemiColon)) )
.then_ignore(just(Token::KwElse)) .then_ignore(just(Token::KwElse))
.then( .then(
do_block.clone() do_block.clone()
.or(expr.clone()) .or(expr.clone())
).then_ignore(just(Token::SemiColon)) )
.then_ignore(just(Token::KwEnd)) .then_ignore(just(Token::KwEnd))
.map(|((cond, then), else_)| { .map(|((cond, then), else_)| {