functionremoved v1.7.28added v1.7.10Edit
(analyze state source cb)
(analyze state source name cb)
(analyze state source name opts cb)

Source docstring:
Analyze ClojureScript source. The compiler state will be populated with
the results of analyzes. The parameters:

state (atom)
  the compiler state

source (string)
  the ClojureScript source

name (symbol)
  optional, the name of the source

opts (map)
  compilation options.

:eval - the eval function to invoke, see *eval-fn*
:load - library resolution function, see *load-fn*

cb (function)
  callback, will be invoked with a map. If successful the map will contain
  a key :value, the actual value is not meaningful. If unsuccessful the
  map will contain a key :error with an ex-info instance describing the cause
  of failure.
Source code @ clojurescript:src/main/cljs/cljs/js.cljs
(defn analyze
  ([state source cb]
   (analyze state source nil cb))
  ([state source name cb]
   (analyze state source name nil cb))
  ([state source name opts cb]
   {:pre [(atom? state) (string? source)
          (valid-name? name) (valid-opts? opts) (fn? cb)]}
     {:*compiler*     state
      :*data-readers* tags/*cljs-data-readers*
      :*load-fn*      (or (:load opts) *load-fn*)
      :*eval-fn*      (or (:eval opts) *eval-fn*)}
     source name opts cb)))