js-on-sx: object computed keys + insertion-order tracking
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 24s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 24s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user