js-on-sx: parser accepts new <literal>; runtime throws TypeError
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 44s

This commit is contained in:
2026-05-09 15:18:42 +00:00
parent 7fc37abe02
commit 72be94c900
2 changed files with 14 additions and 0 deletions

View File

@@ -153,6 +153,18 @@
(do (jp-advance! st) (list (quote js-ident) "this")))
((and (= (get t :type) "keyword") (= (get t :value) "new"))
(do (jp-advance! st) (jp-parse-new-expr st)))
((and (= (get t :type) "keyword") (= (get t :value) "true"))
(do (jp-advance! st) (list (quote js-bool) true)))
((and (= (get t :type) "keyword") (= (get t :value) "false"))
(do (jp-advance! st) (list (quote js-bool) false)))
((and (= (get t :type) "keyword") (= (get t :value) "null"))
(do (jp-advance! st) (list (quote js-null))))
((and (= (get t :type) "keyword") (= (get t :value) "undefined"))
(do (jp-advance! st) (list (quote js-undef))))
((= (get t :type) "number")
(do (jp-advance! st) (list (quote js-num) (get t :value))))
((= (get t :type) "string")
(do (jp-advance! st) (list (quote js-str) (get t :value))))
((and (= (get t :type) "punct") (= (get t :value) "("))
(jp-parse-paren-or-arrow st))
(else