Liking cljdoc? Tell your friends :D

eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm

Analyzer for clojure code, extends tools.analyzer with JVM specific passes/forms

Analyzer for clojure code, extends tools.analyzer with JVM specific passes/forms
raw docstring

-deftypeclj

(-deftype name class-name args interfaces)

analyzeclj

(analyze form)
(analyze form env)
(analyze form env opts)

Analyzes a clojure form using tools.analyzer augmented with the JVM specific special ops and returns its AST, after running #'run-passes on it.

If no configuration option is provides, analyze will setup tools.analyzer using the extension points declared in this namespace.

If provided, opts should be a map of options to analyze, currently the only valid options are :bindings and :passes-opts (if not provided, :passes-opts defaults to the value of default-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}})

Analyzes a clojure form using tools.analyzer augmented with the JVM specific special ops
and returns its AST, after running #'run-passes on it.

If no configuration option is provides, analyze will setup tools.analyzer using the extension
points declared in this namespace.

If provided, opts should be a map of options to analyze, currently the only valid
options are :bindings and :passes-opts (if not provided, :passes-opts defaults to the
value of `default-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}})
raw docstring

analyze+evalclj

(analyze+eval form)
(analyze+eval form env)
(analyze+eval form
              env
              {:keys [handle-evaluation-exception]
               :or {handle-evaluation-exception throw!}
               :as opts})

Like analyze but evals the form after the analysis and attaches the returned value in the :result field of the AST node.

If evaluating the form will cause an exception to be thrown, the exception will be caught and wrapped in an ExceptionThrown object, containing the exception in the e field and the AST in the ast field.

The ExceptionThrown object is then passed to handle-evaluation-exception, which by defaults throws the original exception, but can be used to provide a replacement return value for the evaluation of the AST.

Unrolls do forms to handle the Gilardi scenario.

Useful when analyzing whole files/namespaces.

Like analyze but evals the form after the analysis and attaches the
returned value in the :result field of the AST node.

If evaluating the form will cause an exception to be thrown, the exception
will be caught and wrapped in an ExceptionThrown object, containing the
exception in the `e` field and the AST in the `ast` field.

The ExceptionThrown object is then passed to `handle-evaluation-exception`,
which by defaults throws the original exception, but can be used to provide
a replacement return value for the evaluation of the AST.

Unrolls `do` forms to handle the Gilardi scenario.

Useful when analyzing whole files/namespaces.
raw docstring

analyze-method-implsclj

(analyze-method-impls [method [this & params :as args] & body :as form] env)

analyze-nsclj

(analyze-ns ns)
(analyze-ns ns env)
(analyze-ns ns env opts)

Analyzes a whole namespace, returns a vector of the ASTs for all the top-level ASTs of that namespace. Evaluates all the forms.

Analyzes a whole namespace, returns a vector of the ASTs for all the
top-level ASTs of that namespace.
Evaluates all the forms.
raw docstring

build-ns-mapclj

(build-ns-map)

create-varclj

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

Creates a Var for sym and returns it. The Var gets interned in the env namespace.

Creates a Var for sym and returns it.
The Var gets interned in the env namespace.
raw 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
raw docstring

default-passes-optsclj

Default :passes-opts for analyze

Default :passes-opts for `analyze`
raw docstring

desugar-host-exprclj

(desugar-host-expr form env)

desugar-symbolclj

(desugar-symbol form env)

empty-envclj

(empty-env)

Returns an empty env map

Returns an empty env map
raw docstring

global-envclj

(global-env)

macroexpand-1clj

(macroexpand-1 form)
(macroexpand-1 form env)

If form represents a macro form or an inlineable function,returns its expansion, else returns form.

If form represents a macro form or an inlineable function,returns its expansion,
else returns form.
raw docstring

macroexpand-allclj

(macroexpand-all form)
(macroexpand-all form env)
(macroexpand-all form env opts)

Like clojure.walk/macroexpand-all but correctly handles lexical scope

Like clojure.walk/macroexpand-all but correctly handles lexical scope
raw docstring

parseclj

(parse form env)

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

Extension to tools.analyzer/-parse for JVM special forms
raw docstring

parse-case*clj

(parse-case* [_ expr shift mask default case-map switch-type test-type &
              [skip-check?] :as form]
             env)

parse-deftype*clj

(parse-deftype* [_ name class-name fields _ interfaces & methods :as form] env)

parse-import*clj

(parse-import* [_ class :as form] env)

parse-monitor-enterclj

(parse-monitor-enter [_ target :as form] env)

parse-monitor-exitclj

(parse-monitor-exit [_ target :as form] env)

parse-opts+methodsclj

(parse-opts+methods methods)

parse-reify*clj

(parse-reify* [_ interfaces & methods :as form] env)

qualify-arglistsclj

(qualify-arglists arglists)

run-passesclj

(run-passes ast)

Function that will be invoked on the AST tree immediately after it has been constructed, by default runs the passes declared in #'default-passes, should be rebound if a different set of passes is required.

Use #'eastwood.copieddeps.dep1.clojure.tools.analyzer.passes/schedule to get a function from a set of passes that run-passes can be bound to.

Function that will be invoked on the AST tree immediately after it has been constructed,
by default runs the passes declared in #'default-passes, should be rebound if a different
set of passes is required.

Use #'eastwood.copieddeps.dep1.clojure.tools.analyzer.passes/schedule to get a function from a set of passes that
run-passes can be bound to.
raw docstring

scheduled-default-passesclj


specialsclj

Set of the special forms for clojure in the JVM

Set of the special forms for clojure in the JVM
raw docstring

update-ns-map!clj

(update-ns-map!)

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

× close