1
1
Fork 0
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:
Natapat Samutpong 2022-02-17 21:41:41 +07:00
parent 01b7d33181
commit c3e9ede0ef
4 changed files with 2 additions and 4 deletions

View file

@ -1,5 +1,5 @@
fun foo a b = a * b; fun foo a b = a * b;
let bar = foo(3, 3); let bar = foo( 3 3 );
if bar == 9 then if bar == 9 then
do do

BIN
let.cmi Normal file

Binary file not shown.

BIN
let.cmo Normal file

Binary file not shown.

View file

@ -149,9 +149,7 @@ fn expr_parser() -> impl Parser<Token, Expr, Error = Simple<Token>> + Clone {
}).labelled("literal"); }).labelled("literal");
let args = expr.clone() let args = expr.clone()
.chain(just(Token::Comma) .repeated()
.ignore_then(expr.clone()).repeated())
.then_ignore(just(Token::Comma).or_not())
.or_not() .or_not()
.map(|item| item.unwrap_or_else(Vec::new)); .map(|item| item.unwrap_or_else(Vec::new));