mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
use delimited_by
instead
This commit is contained in:
parent
419d152cf7
commit
8c63304acf
|
@ -251,13 +251,13 @@ fn expr_parser() -> impl Parser<Token, Vec<Spanned<Expr>>, Error = Simple<Token>
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
let do_block = just(Token::KwDo)
|
let do_block = expr.clone()
|
||||||
.ignore_then(
|
|
||||||
expr.clone()
|
|
||||||
.then_ignore(just(Token::SemiColon))
|
.then_ignore(just(Token::SemiColon))
|
||||||
.repeated()
|
.repeated()
|
||||||
|
.delimited_by(
|
||||||
|
just(Token::KwDo),
|
||||||
|
just(Token::KwEnd),
|
||||||
)
|
)
|
||||||
.then_ignore(just(Token::KwEnd))
|
|
||||||
.map_with_span(|body, span| {
|
.map_with_span(|body, span| {
|
||||||
(
|
(
|
||||||
Expr::Do {
|
Expr::Do {
|
||||||
|
|
Loading…
Reference in a new issue