Analyzer for clojurescript code, extends tools.analyzer with JS specific passes/forms
Analyzer for clojurescript code, extends tools.analyzer with JS specific passes/forms
(analyze form)
(analyze form env)
(analyze form env opts)
Returns an AST for the form.
Binds tools.analyzer/{macroexpand-1,create-var,parse} to tools.analyzer.js/{macroexpand-1,create-var,parse} and analyzes the form.
If provided, opts should be a map of options to analyze, currently the only valid options are :bindings and :passes-opts. If provided, :bindings should be a map of Var->value pairs that will be merged into the default bindings for tools.analyzer, useful to provide custom extension points. If provided, :passes-opts should be a map of pass-name-kw->pass-config-map pairs that can be used to configure the behaviour of each pass.
E.g. (analyze form env {:bindings {#'ana/macroexpand-1 my-mexpand-1}})
Calls run-passes
on the AST.
Returns an AST for the form. Binds tools.analyzer/{macroexpand-1,create-var,parse} to tools.analyzer.js/{macroexpand-1,create-var,parse} and analyzes the form. If provided, opts should be a map of options to analyze, currently the only valid options are :bindings and :passes-opts. If provided, :bindings should be a map of Var->value pairs that will be merged into the default bindings for tools.analyzer, useful to provide custom extension points. If provided, :passes-opts should be a map of pass-name-kw->pass-config-map pairs that can be used to configure the behaviour of each pass. E.g. (analyze form env {:bindings {#'ana/macroexpand-1 my-mexpand-1}}) Calls `run-passes` on the AST.
(analyze' form)
(analyze' form env)
(analyze' form env opts)
Like analyze
but runs cleanup on the AST
Like `analyze` but runs cleanup on the AST
(analyze-ns ns)
Analyzes a whole namespace, returns a vector of the ASTs for all the top-level ASTs of that namespace.
Analyzes a whole namespace, returns a vector of the ASTs for all the top-level ASTs of that namespace.
(backup-env)
Caches the current namespaces state in a resource file, can be restored with (restore-env)
Caches the current namespaces state in a resource file, can be restored with (restore-env)
(cljs-env->env)
Converts the namespace map of the current cljs environment in a tools.analyzer.js namespace map and returns it.
Converts the namespace map of the current cljs environment in a tools.analyzer.js namespace map and returns it.
(create-var sym {:keys [ns]})
Creates a var map for sym and returns it.
Creates a var map for sym and returns it.
Set of passes that will be run by default on the AST by #'run-passes
Set of passes that will be run by default on the AST by #'run-passes
Extension to tools.analyzer/-parse for CLJS special forms
Extension to tools.analyzer/-parse for CLJS special forms
(populate-env {:keys [import require require-macros refer-clojure]} ns-name env)
(restore-env)
Uses a cached env to populate the default namespace map
Uses a cached env to populate the default namespace map
(run-passes ast)
Function that will be invoked on the AST tree immediately after it has been constructed, by default set-ups and runs the default passes declared in #'default-passes
Function that will be invoked on the AST tree immediately after it has been constructed, by default set-ups and runs the default passes declared in #'default-passes
(setup-rt!)
Setups the basic runtime, loading cljs.core and initializing cljs.user
Setups the basic runtime, loading cljs.core and initializing cljs.user
Set of the special forms for clojurescript
Set of the special forms for clojurescript
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close