Liking cljdoc? Tell your friends :D

clojure.tools.analyzer.js

Analyzer for clojurescript code, extends tools.analyzer with JS specific passes/forms

Analyzer for clojurescript code, extends tools.analyzer with JS specific passes/forms
raw docstring

*ns*clj

source

analyzeclj

(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.
sourceraw docstring

analyze'clj

(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
sourceraw docstring

analyze-formclj

(analyze-form form env)
source

analyze-js-valueclj

(analyze-js-value form env)
source

analyze-nsclj

(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.
sourceraw docstring

backup-envclj

(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)
sourceraw docstring

cljs-env->envclj

(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.
sourceraw docstring

core-envclj

source

core-macrosclj

(core-macros)
source

create-varclj

(create-var sym {:keys [ns]})

Creates a var map for sym and returns it.

Creates a var map for sym and returns it.
sourceraw docstring

default-passesclj

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
sourceraw docstring

desugar-host-exprclj

(desugar-host-expr form env)
source

desugar-symbolclj

(desugar-symbol form env)
source

dotted-symbol?clj

(dotted-symbol? form env)
source

empty-envclj

(empty-env)

Returns an empty env map

Returns an empty env map
sourceraw docstring

ensure-loadedclj

(ensure-loaded ns {:keys [refer]})
source

fix-nsclj

(fix-ns ns)
source

fix-ns-macroclj

(fix-ns-macro ns)
source

fix-symbolclj

(fix-symbol sym)
source

global-envclj

(global-env)
source

macroexpand-1clj

(macroexpand-1 form env)
source

maybe-macroclj

(maybe-macro sym {:keys [ns]})
source

ns-resolveclj

(ns-resolve ns sym)
source

parsecljmultimethod

Extension to tools.analyzer/-parse for CLJS special forms

Extension to tools.analyzer/-parse for CLJS special forms
sourceraw docstring

parse-typeclj

(parse-type op [_ name fields pmasks body :as form] {:keys [ns] :as env})
source

populate-envclj

(populate-env {:keys [import require require-macros refer-clojure]} ns-name env)
source

resolve-symclj

(resolve-sym sym env)
source

restore-envclj

(restore-env)

Uses a cached env to populate the default namespace map

Uses a cached env to populate the default namespace map
sourceraw docstring

run-passesclj

(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
sourceraw docstring

scheduled-default-passesclj

source

setup-rt!clj

(setup-rt!)

Setups the basic runtime, loading cljs.core and initializing cljs.user

Setups the basic runtime, loading cljs.core and initializing cljs.user
sourceraw docstring

specialsclj

Set of the special forms for clojurescript

Set of the special forms for clojurescript
sourceraw docstring

var?clj

(var? x)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close