Support calling functions with multiple arguments
This commit is contained in:
parent
d7c1ae4f76
commit
a0163315d3
@ -487,8 +487,11 @@ class Parser {
|
||||
}
|
||||
fnCall(fnNode) {
|
||||
this.tokens.expect(T.Of);
|
||||
// TODO: support multiple arguments
|
||||
const args = [this.expr()];
|
||||
while (this.tokens.peek() === T.Comma) {
|
||||
this.tokens.next(); // comma
|
||||
args.push(this.expr());
|
||||
}
|
||||
return {
|
||||
type: N.FnCall,
|
||||
fn: fnNode,
|
||||
|
Loading…
Reference in New Issue
Block a user