File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed
src/main/clojure/cljs/analyzer Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 2828 ([opts]
2929 (env/default-compiler-env opts )))
3030
31- (defn current-state []
31+ (defn current-state
32+ " Return the current compiler state atom."
33+ []
3234 env /*compiler*)
3335
36+ (defn current-file
37+ " Return the current file under analysis or compilation."
38+ []
39+ ana /*cljs-file*)
40+
41+ (defn current-ns
42+ " Return the current ns under analysis or compilation."
43+ []
44+ ana /*cljs-ns*)
45+
3446(defmacro with-state
3547 " Run the body with the given compilation state Atom<Map>."
3648 [state & body]
95107 ([state]
96108 (get @state :js-dependency-index )))
97109
98- (def default-passes ana /default-passes )
110+ (def
111+ ^{:doc " ClojureScript's default analysis passes." }
112+ default-passes ana /default-passes )
99113
100- (defmacro with-passes [passes & body]
114+ (defmacro with-passes
115+ " Evaluate the body with the provided sequence of compiler passes."
116+ [passes & body]
101117 `(binding [ana/*passes* ~passes]
102118 ~@body))
103119
You can’t perform that action at this time.
0 commit comments