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:
parent
961b0ff130
commit
6b984f8711
|
@ -277,7 +277,6 @@ fn expr_parser() -> impl Parser<Token, Vec<Spanned<Expr>>, Error = Simple<Token>
|
|||
});
|
||||
|
||||
let do_block = expr.clone()
|
||||
.then_ignore(just(Token::SemiColon))
|
||||
.repeated()
|
||||
.delimited_by(
|
||||
just(Token::KwDo),
|
||||
|
@ -299,13 +298,13 @@ fn expr_parser() -> impl Parser<Token, Vec<Spanned<Expr>>, Error = Simple<Token>
|
|||
.then(
|
||||
do_block.clone()
|
||||
.or(expr.clone())
|
||||
).then_ignore(just(Token::SemiColon))
|
||||
)
|
||||
|
||||
.then_ignore(just(Token::KwElse))
|
||||
.then(
|
||||
do_block.clone()
|
||||
.or(expr.clone())
|
||||
).then_ignore(just(Token::SemiColon))
|
||||
)
|
||||
|
||||
.then_ignore(just(Token::KwEnd))
|
||||
.map(|((cond, then), else_)| {
|
||||
|
|
Loading…
Reference in a new issue