function | since v1.7.10 | Edit |
(empty-state)
(empty-state init)
Construct an empty compiler state. Required to invoke analyze, compile, eval and eval-str.
(defn empty-state
([]
(doto (env/default-compiler-env)
(swap!
(fn [state]
(-> state
(assoc-in [::ana/namespaces 'cljs.core] (dump-core)))))))
([init]
(doto (empty-state) (swap! init))))