Allow multiple template bodies
This commit is contained in:
parent
d1ecb7e52e
commit
de6786eb28
@ -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));
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.3 KiB |
@ -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,)
|
||||
|
Loading…
Reference in New Issue
Block a user