Skip to content

Commit 3e4b083

Browse files
author
dnolen
committed
change cljs.analyzer/parse-ns so that it also accepts a symbol
1 parent 0cad406 commit 3e4b083

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/clj/cljs/analyzer.clj

+4-1
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,10 @@ argument, which the reader will use in any emitted errors."
18201820
([src opts] (parse-ns src nil opts))
18211821
([src dest opts]
18221822
(env/ensure
1823-
(let [namespaces' (::namespaces @env/*compiler*)
1823+
(let [src (if (symbol? src)
1824+
(io/resource (util/ns->relpath src))
1825+
src)
1826+
namespaces' (::namespaces @env/*compiler*)
18241827
ret
18251828
(binding [*cljs-ns* 'cljs.user
18261829
*macro-infer*

0 commit comments

Comments
 (0)