Liking cljdoc? Tell your friends :D

skeptic.analysis.annotate.runner

Trampoline for the annotate helpers.

End state (Phase 7): every annotate helper has signature (Ctx, AnnotatedNode) -> Step, where Step is the sum type below.

[:done annotated-node]
[:call helper-fn ctx node k]

run is a loop over a heap-allocated stack of continuations. During the Phase 2-6 migration window, some helpers still return plain AnnotatedNode values; step? / normalize plus the [:done v] auto-wrap branch inside run carry those through. All three are migration-window cruft and are deleted in Phase 7 contraction.

Trampoline for the annotate helpers.

End state (Phase 7): every annotate helper has signature
`(Ctx, AnnotatedNode) -> Step`, where `Step` is the sum type below.

    [:done annotated-node]
    [:call helper-fn ctx node k]

`run` is a loop over a heap-allocated stack of continuations. During
the Phase 2-6 migration window, some helpers still return plain
AnnotatedNode values; `step?` / `normalize` plus the [:done v]
auto-wrap branch inside `run` carry those through. All three are
migration-window cruft and are deleted in Phase 7 contraction.
raw docstring

callclj

(call helper-fn ctx node k)

Inputs: [helper-fn :- (s/pred fn?) ctx :- s/Any node :- aas/AnnotatedNode k :- (s/pred fn?)] Returns: Step

Inputs: [helper-fn :- (s/pred fn?) ctx :- s/Any node :- aas/AnnotatedNode k :- (s/pred fn?)]
Returns: Step
sourceraw docstring

CallStepclj

Dispatch step. Run (helper-fn ctx node); the trampoline pushes k onto the continuation stack and resumes with (k v) once that invocation terminates with [:done v].

Dispatch step. Run `(helper-fn ctx node)`; the trampoline pushes `k`
onto the continuation stack and resumes with `(k v)` once that
invocation terminates with `[:done v]`.
sourceraw docstring

doneclj

(done node)

Inputs: [node :- aas/AnnotatedNode] Returns: Step

Inputs: [node :- aas/AnnotatedNode]
Returns: Step
sourceraw docstring

DoneStepclj

Terminal step. The carried value is structurally polymorphic — it is whatever the next continuation expects. The OUTERMOST [:done v] popped by run carries an AnnotatedNode (enforced by run's return schema).

Terminal step. The carried value is structurally polymorphic — it
is whatever the next continuation expects. The OUTERMOST [:done v]
popped by `run` carries an AnnotatedNode (enforced by `run`'s return
schema).
sourceraw docstring

reduce-childrenclj

(reduce-children ctx state children step-fn final-k)

Inputs: [ctx :- s/Any state :- s/Any children :- [aas/AnnotatedNode] step-fn :- (s/pred fn?) final-k :- (s/pred fn?)] Returns: Step

Inputs: [ctx :- s/Any state :- s/Any children :- [aas/AnnotatedNode] step-fn :- (s/pred fn?) final-k :- (s/pred fn?)]
Returns: Step
sourceraw docstring

runclj

(run helper-fn ctx node)

Inputs: [helper-fn :- (s/pred fn?) ctx :- s/Any node :- aas/AnnotatedNode] Returns: aas/AnnotatedNode

Inputs: [helper-fn :- (s/pred fn?) ctx :- s/Any node :- aas/AnnotatedNode]
Returns: aas/AnnotatedNode
sourceraw docstring

sequence-childrenclj

(sequence-children ctx children final-k)

Inputs: [ctx :- s/Any children :- [aas/AnnotatedNode] final-k :- (s/pred fn?)] Returns: Step

Inputs: [ctx :- s/Any children :- [aas/AnnotatedNode] final-k :- (s/pred fn?)]
Returns: Step
sourceraw docstring

Stepclj

Sum type returned by every step-shaped annotate helper at end state. Exactly two variants: DoneStep | CallStep.

Sum type returned by every step-shaped annotate helper at end
state. Exactly two variants: DoneStep | CallStep.
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