(defn analyze-record
[env x]
(let [items (disallowing-recur
(analyze (assoc env :context :expr) (into {} x)))
[ns name] (map symbol
#?(:clj
((juxt (comp #(string/join "." %) butlast) last)
(string/split (.getName ^Class (type x)) #"\."))
:cljs
(string/split (pr-str (type x)) #"/")))]
{:op :record-value
:ns ns
:name name
:env env
:form x
:items items
:children [items]
:tag (symbol (str ns) (str name))}))