js-on-sx: parse-time SyntaxError on illegal break/continue/return; void evaluates expr
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 25s

This commit is contained in:
2026-05-10 13:07:43 +00:00
parent 019a0c6105
commit 29a3fb4bc2
3 changed files with 80 additions and 16 deletions

View File

@@ -251,7 +251,8 @@
((= op "!") (list (js-sym "js-not") a))
((= op "~") (list (js-sym "js-bitnot") a))
((= op "typeof") (list (js-sym "js-typeof") a))
((= op "void") (list (js-sym "quote") :js-undefined))
((= op "void")
(list (js-sym "begin") a (list (js-sym "quote") :js-undefined)))
(else (error (str "js-transpile-unop: unsupported op: " op)))))))))
;; ── Array literal ─────────────────────────────────────────────────