add note on implementation detail of using cljs.analyzer
This commit is contained in:
parent
2dff143070
commit
aedb7235f9
1 changed files with 3 additions and 0 deletions
|
|
@ -447,6 +447,9 @@
|
||||||
|
|
||||||
(defn cljs-macroexpand [env form]
|
(defn cljs-macroexpand [env form]
|
||||||
(require 'cljs.analyzer)
|
(require 'cljs.analyzer)
|
||||||
|
;; need to get the expansion function like this so that
|
||||||
|
;; this code compiles in a clojure environment where cljs.analyzer
|
||||||
|
;; namespace does not exist
|
||||||
(let [expand-fn (eval 'cljs.analyzer/macroexpand-1)
|
(let [expand-fn (eval 'cljs.analyzer/macroexpand-1)
|
||||||
mform (expand-fn env form)]
|
mform (expand-fn env form)]
|
||||||
(cond (identical? form mform) mform
|
(cond (identical? form mform) mform
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue