summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorLinus Lee <linus@thesephist.com>2020-09-24 07:47:35 -0400
committerLinus Lee <linus@thesephist.com>2020-09-24 07:47:35 -0400
commita0163315d33cdaf902812782f20d92028440a1f1 (patch)
treee39269c7f580edb5b09e0e19fd50fe6ae2258103 /static
parentd7c1ae4f765023fbc61502f2899e3d4caa3e6d80 (diff)
downloadtabloid-fake-closure-a0163315d33cdaf902812782f20d92028440a1f1.tar.gz
tabloid-fake-closure-a0163315d33cdaf902812782f20d92028440a1f1.zip
Support calling functions with multiple arguments
Diffstat (limited to 'static')
-rw-r--r--static/js/lang.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/static/js/lang.js b/static/js/lang.js
index d2189ef..5000e81 100644
--- a/static/js/lang.js
+++ b/static/js/lang.js
@@ -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,