Liking cljdoc? Tell your friends :D

skeptic.cljs.analyzer-driver

Single-form cljs analysis entrypoints via a file-local cljs compiler state.

analyze-form analyzes one already-read cljs form against a supplied ns AST inside a non-leaking compiler state, used by the schema/malli collectors to type a post-macroexpansion declaration body. Whole-file analysis lives on the worker (skeptic.worker.analyzer-cljs); the checker never analyzes cljs source files through this namespace.

cljs ASTs carry :type on :binding/:fn-method nodes that conflicts with skeptic's :type slot (SemanticType), and :binding nodes lack :form. analyze-form strips and synthesizes via normalize-cljs-node so the skeptic annotate pipeline starts from a clean shape.

Single-form cljs analysis entrypoints via a file-local cljs compiler state.

`analyze-form` analyzes one already-read cljs form against a supplied ns AST
inside a non-leaking compiler state, used by the schema/malli collectors to
type a post-macroexpansion declaration body. Whole-file analysis lives on the
worker (`skeptic.worker.analyzer-cljs`); the checker never analyzes cljs
source files through this namespace.

cljs ASTs carry `:type` on `:binding`/`:fn-method` nodes that conflicts
with skeptic's `:type` slot (SemanticType), and `:binding` nodes lack
`:form`. `analyze-form` strips and synthesizes via `normalize-cljs-node`
so the skeptic annotate pipeline starts from a clean shape.
raw docstring

analyze-formclj

(analyze-form ns-ast form)

Inputs: [ns-ast :- aas/AnnotatedNode form :- s/Any] Returns: aas/AnnotatedNode

Analyze an already-read cljs form using the supplied ns AST. Real source files should use analyze-source-file, which keeps cljs reading and analysis in one file-local compiler state.

Inputs: [ns-ast :- aas/AnnotatedNode form :- s/Any]
Returns: aas/AnnotatedNode

Analyze an already-read cljs form using the supplied ns AST. Real source
files should use `analyze-source-file`, which keeps cljs reading and
analysis in one file-local compiler state.
sourceraw docstring

empty-stateclj

(empty-state)

Empty cljs compiler state with :spec-skip-macros true. Skeptic does not validate cljs macro-syntax specs (e.g. :cljs.core.specs.alpha/ns-form); those specs bind Skeptic to whichever cljs.core.specs.alpha shipped with the bundled cljs version, breaking on projects that use ns-clauses (:refer-global, etc.) newer than the bundled spec knows. The analyzer's own 'ns parser handles these clauses via ns-spec-cases; only the spec validator was out-of-date. do-macroexpand-check (analyzer.cljc:4252) honors this option.

Empty cljs compiler state with `:spec-skip-macros true`. Skeptic
does not validate cljs macro-syntax specs
(e.g. `:cljs.core.specs.alpha/ns-form`); those specs bind Skeptic to
whichever `cljs.core.specs.alpha` shipped with the bundled cljs
version, breaking on projects that use ns-clauses (`:refer-global`,
etc.) newer than the bundled spec knows. The analyzer's own 'ns
parser handles these clauses via `ns-spec-cases`; only the spec
validator was out-of-date. `do-macroexpand-check`
(`analyzer.cljc:4252`) honors this option.
sourceraw docstring

find-by-opclj

(find-by-op op ast)

Inputs: [op :- s/Keyword ast :- aas/AnnotatedNode] Returns: (s/maybe aas/AnnotatedNode)

Return the first AST node whose :op is op, located by directed descent through :children keys only. Mirrors walk-ast's pruning so callers do not traverse :env, :info, :meta, or other non-AST slots that can carry compiler-state cycles or large binding-info trees on real cljs ASTs.

Inputs: [op :- s/Keyword ast :- aas/AnnotatedNode]
Returns: (s/maybe aas/AnnotatedNode)

Return the first AST node whose `:op` is `op`, located by directed descent
through `:children` keys only. Mirrors `walk-ast`'s pruning so callers do
not traverse `:env`, `:info`, `:meta`, or other non-AST slots that can
carry compiler-state cycles or large binding-info trees on real cljs ASTs.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close