removed semicolons (if)

pull/4/head
Natapat Samutpong 2022-04-01 15:16:11 +07:00
parent 961b0ff130
commit 6b984f8711
1 changed files with 2 additions and 3 deletions

View File

@ -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_)| {