diff options
| -rw-r--r-- | src/parse/mod.rs | 2 | ||||
| -rw-r--r-- | tests/ref/code/call.png | bin | 1865 -> 2397 bytes | |||
| -rw-r--r-- | tests/typ/code/call.typ | 5 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/parse/mod.rs b/src/parse/mod.rs index cc710201..8466d99f 100644 --- a/src/parse/mod.rs +++ b/src/parse/mod.rs @@ -561,7 +561,7 @@ fn call(p: &mut Parser, callee: Expr) -> Option<Expr> { } }; - if p.peek_direct() == Some(Token::LeftBracket) { + while p.peek_direct() == Some(Token::LeftBracket) { let body = template(p); args.items.push(CallArg::Pos(body)); } diff --git a/tests/ref/code/call.png b/tests/ref/code/call.png Binary files differindex f5e19783..bd6f22f3 100644 --- a/tests/ref/code/call.png +++ b/tests/ref/code/call.png diff --git a/tests/typ/code/call.typ b/tests/typ/code/call.typ index ffd91769..5ab0252c 100644 --- a/tests/typ/code/call.typ +++ b/tests/typ/code/call.typ @@ -20,6 +20,11 @@ #f()[A] #f([A]) +#let g(a, b) = a + b +#g[A][B] +#g([A], [B]) +#g()[A][B] + --- // Trailing comma. #test(1 + 1, 2,) |
