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 28
28
([opts]
29
29
(env/default-compiler-env opts )))
30
30
31
- (defn current-state []
31
+ (defn current-state
32
+ " Return the current compiler state atom."
33
+ []
32
34
env /*compiler*)
33
35
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
+
34
46
(defmacro with-state
35
47
" Run the body with the given compilation state Atom<Map>."
36
48
[state & body]
95
107
([state]
96
108
(get @state :js-dependency-index )))
97
109
98
- (def default-passes ana /default-passes )
110
+ (def
111
+ ^{:doc " ClojureScript's default analysis passes." }
112
+ default-passes ana /default-passes )
99
113
100
- (defmacro with-passes [passes & body]
114
+ (defmacro with-passes
115
+ " Evaluate the body with the provided sequence of compiler passes."
116
+ [passes & body]
101
117
`(binding [ana/*passes* ~passes]
102
118
~@body))
103
119
You can’t perform that action at this time.
0 commit comments