Liking cljdoc? Tell your friends :D

meme-lang.stages

Composable pipeline stages for the lossless reader.

Pipeline: step-parse → step-read

Each stage is a ctx → ctx function operating on a shared context map:

KeyTypeWritten byRead by
:sourceStringcallerparse
:optsMap or nilcallerparse, read
:cstVectorparseread, (tooling)
:formsVectorreadcaller

Stages are independent. Compose in any order respecting dependencies. Skip step-read for tooling that works with CST directly.

Composable pipeline stages for the lossless reader.

Pipeline: step-parse → step-read

Each stage is a ctx → ctx function operating on a shared context map:

| Key          | Type           | Written by  | Read by          |
|--------------|----------------|-------------|------------------|
| :source      | String         | caller      | parse            |
| :opts        | Map or nil     | caller      | parse, read      |
| :cst         | Vector         | parse       | read, (tooling)  |
| :forms       | Vector         | read        | caller           |

Stages are independent. Compose in any order respecting dependencies.
Skip step-read for tooling that works with CST directly.
raw docstring

expand-syntax-quotesclj/s

(expand-syntax-quotes forms opts)

Expand syntax-quote AST nodes in a seq of forms. Convenience wrapper around step-expand-syntax-quotes for callers that don't need the full pipeline context map.

Expand syntax-quote AST nodes in a seq of forms. Convenience wrapper
around step-expand-syntax-quotes for callers that don't need the
full pipeline context map.
sourceraw docstring

runclj/s

(run source)
(run source opts)

Run the full pipeline: source → CST → forms.

Run the full pipeline: source → CST → forms.
sourceraw docstring

step-expand-syntax-quotesclj/s

(step-expand-syntax-quotes ctx)

Expand syntax-quote AST nodes, unwrap MemeRaw values, and convert MemeAutoKeyword records to eval-able forms in :forms. Produces plain Clojure forms ready for eval.

Expand syntax-quote AST nodes, unwrap MemeRaw values, and convert
MemeAutoKeyword records to eval-able forms in :forms.
Produces plain Clojure forms ready for eval.
sourceraw docstring

step-parseclj/s

(step-parse ctx)

Parse source string into CST using the unified Pratt parser. Uses meme grammar by default, or (:grammar opts) if provided. Reads :source, writes :cst.

Parse source string into CST using the unified Pratt parser.
Uses meme grammar by default, or (:grammar opts) if provided.
Reads :source, writes :cst.
sourceraw docstring

step-readclj/s

(step-read ctx)

Lower CST to Clojure forms via the CST reader. Reads :cst, writes :forms.

Lower CST to Clojure forms via the CST reader.
Reads :cst, writes :forms.
sourceraw docstring

strip-shebangclj/s

(strip-shebang source)

Strip a leading #! shebang line from source.

Strip a leading #! shebang line from source.
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