mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
😱 no comma in args call!?
This commit is contained in:
parent
01b7d33181
commit
c3e9ede0ef
|
@ -1,5 +1,5 @@
|
|||
fun foo a b = a * b;
|
||||
let bar = foo(3, 3);
|
||||
let bar = foo( 3 3 );
|
||||
|
||||
if bar == 9 then
|
||||
do
|
||||
|
|
|
@ -149,9 +149,7 @@ fn expr_parser() -> impl Parser<Token, Expr, Error = Simple<Token>> + Clone {
|
|||
}).labelled("literal");
|
||||
|
||||
let args = expr.clone()
|
||||
.chain(just(Token::Comma)
|
||||
.ignore_then(expr.clone()).repeated())
|
||||
.then_ignore(just(Token::Comma).or_not())
|
||||
.repeated()
|
||||
.or_not()
|
||||
.map(|item| item.unwrap_or_else(Vec::new));
|
||||
|
||||
|
|
Loading…
Reference in a new issue