cljs.js/load-macros
function | removed v1.7.28 | added v1.7.10 | Edit |
(load-macros bound-vars k macros reload reloads opts cb)
(defn load-macros [bound-vars k macros reload reloads opts cb]
(if (seq macros)
(let [nsym (first (vals macros))
k (or (k reload)
(get-in reloads [k nsym])
(and (= nsym name) (:*reload-macros* bound-vars) :reload))]
(require bound-vars nsym k
(-> opts
(assoc :macros-ns true)
(dissoc :context)
(dissoc :ns))
(fn [res]
(if-not (:error res)
(load-macros bound-vars k (next macros) reload reloads opts cb)
(cb res)))))
(cb {:value nil})))