js-on-sx: object computed keys + insertion-order tracking
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 24s

This commit is contained in:
2026-05-08 18:16:32 +00:00
parent a8d0dfb38a
commit 0d99b5dfe8
4 changed files with 192 additions and 19 deletions

View File

@@ -584,6 +584,16 @@
(jp-advance! st)
(jp-expect! st "punct" ":")
(append! kvs {:value (jp-parse-assignment st) :key (get t :value)})))
((and (= (get t :type) "punct") (= (get t :value) "["))
(do
(jp-advance! st)
(let
((key-expr (jp-parse-assignment st)))
(jp-expect! st "punct" "]")
(jp-expect! st "punct" ":")
(append!
kvs
{:value (jp-parse-assignment st) :computed-key key-expr :key ""}))))
(else (error (str "Unexpected in object: " (get t :type))))))))
(define