(analyze env form)
(analyze env form name)
(analyze env form name opts)
Given an environment, a map containing {:locals (mapping of names to bindings), :context
(one of :statement, :expr, :return), :ns (a symbol naming the
compilation ns)}, and form, returns an expression object (a map
containing at least :form, :op and :env keys). If expr has any (immediately)
nested exprs, must have :children [exprs...] entry. This will
facilitate code walking without knowing the details of the op set.
Source
(defn analyze
"Given an environment, a map containing {:locals (mapping of names to bindings), :context
(one of :statement, :expr, :return), :ns (a symbol naming the
compilation ns)}, and form, returns an expression object (a map
containing at least :form, :op and :env keys). If expr has any (immediately)
nested exprs, must have :children [exprs...] entry. This will
facilitate code walking without knowing the details of the op set."
([env form] (analyze env form nil))
([env form name]
(analyze env form name
(when env/*compiler*
(:options @env/*compiler*))))
([env form name opts]
(ensure
(wrapping-errors env
(binding [*cljs-warnings* (warnings-for form)
reader/*alias-map* (or reader/*alias-map* {})]
(analyze* env form name opts))))))