Skip to content

Commit

Permalink
cljs.js/analyze-str also needs to track the current ns
Browse files Browse the repository at this point in the history
  • Loading branch information
dnolen committed Jul 31, 2015
1 parent f3cf45d commit 33db236
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/cljs/cljs/js.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,10 @@
the-ns (or (:ns opts) 'cljs.user)
bound-vars (cond-> (merge bound-vars {:*cljs-ns* the-ns})
(:source-map opts) (assoc :*sm-data* (sm-data)))]
((fn analyze-loop [last-ast]
((fn analyze-loop [last-ast ns]
(binding [env/*compiler* (:*compiler* bound-vars)
ana/*cljs-ns* (:*cljs-ns* bound-vars)
*ns* (create-ns (:*cljs-ns* bound-vars))
ana/*cljs-ns* ns
*ns* (create-ns ns)
ana/*passes* (:*passes* bound-vars)
r/*data-readers* (:*data-readers* bound-vars)
comp/*source-map-data* (:*sm-data* bound-vars)]
Expand Down Expand Up @@ -417,9 +417,9 @@
(fn [res]
(if (:error res)
(cb res)
(analyze-loop ast))))
(recur ast)))))
(cb {:value last-ast}))))))) nil)))
(analyze-loop ast (:name ast)))))
(recur ast ns)))))
(cb {:value last-ast}))))))) nil the-ns)))

(defn analyze-str
"Analyze ClojureScript source. The compiler state will be populated with
Expand Down

0 comments on commit 33db236

Please sign in to comment.