(defn analyze-form-seq
([forms]
(analyze-form-seq forms
(when env/*compiler*
(:options @env/*compiler*))))
([forms opts]
(let [env (assoc (empty-env) :build-options opts)]
(binding [*file-defs* nil
#?@(:clj [*unchecked-if* false
*unchecked-arrays* false])
*cljs-ns* 'cljs.user
*cljs-file* nil
reader/*alias-map* (or reader/*alias-map* {})]
(loop [ns nil forms forms]
(if (some? forms)
(let [form (first forms)
env (assoc env :ns (get-namespace *cljs-ns*))
ast (analyze env form nil opts)]
(if (= (:op ast) :ns)
(recur (:name ast) (next forms))
(recur ns (next forms))))
ns))))))