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.
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.
(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.
(run source)(run source opts)Run the full pipeline: source → CST → forms.
Run the full pipeline: source → CST → forms.
(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.
(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.
(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.
(strip-shebang source)Strip a leading #! shebang line from source.
Strip a leading #! shebang line from source.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |