js-on-sx: new function(){}(args) parses; new with spread args works
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 42s

This commit is contained in:
2026-05-09 15:50:28 +00:00
parent 72be94c900
commit d1482482ff
3 changed files with 29 additions and 1 deletions

View File

@@ -405,7 +405,19 @@
(list
(js-sym "js-new-call")
(js-transpile callee)
(cons (js-sym "js-args") (map js-transpile args)))))
(cond
((js-has-spread? args)
(cons
(js-sym "js-array-spread-build")
(map
(fn
(e)
(if
(js-tag? e "js-spread")
(list (js-sym "list") "js-spread" (js-transpile (nth e 1)))
(list (js-sym "list") "js-value" (js-transpile e))))
args)))
(else (cons (js-sym "js-args") (map js-transpile args)))))))
(define
js-transpile-array