Liking cljdoc? Tell your friends :D

meme-lang.api

Meme lang composition: lossless pipeline with Pratt parser.

Pipeline: scanner → trivia-attacher → pratt-parser → cst-reader The Pratt parser produces a lossless CST; the CST reader lowers it to Clojure forms.

Meme lang composition: lossless pipeline with Pratt parser.

Pipeline: scanner → trivia-attacher → pratt-parser → cst-reader
The Pratt parser produces a lossless CST; the CST reader lowers it
to Clojure forms.
raw docstring

meme-lang.cst-reader

CST reader: walks CST nodes from the Pratt parser and produces Clojure forms.

This is the lowering step: CST → Clojure forms. It mirrors the classic parser's output (same forms, same metadata, same AST node types) but reads from a lossless tree instead of a token stream.

Pipeline: scanner → trivia-attacher → pratt-parser → cst-reader

CST reader: walks CST nodes from the Pratt parser and produces Clojure forms.

This is the lowering step: CST → Clojure forms. It mirrors the classic
parser's output (same forms, same metadata, same AST node types) but
reads from a lossless tree instead of a token stream.

Pipeline: scanner → trivia-attacher → pratt-parser → **cst-reader**
raw docstring

meme-lang.errors

Consistent error infrastructure for the meme reader/tokenizer. All error throw sites should use meme-error to ensure uniform location tracking and message formatting.

Consistent error infrastructure for the meme reader/tokenizer.
All error throw sites should use `meme-error` to ensure uniform
location tracking and message formatting.
raw docstring

meme-lang.expander

Syntax-quote expansion: MemeSyntaxQuote AST nodes → plain Clojure forms. Called by runtime paths (run, repl) before eval. Not needed for tooling (tooling works with AST nodes directly).

Syntax-quote expansion: MemeSyntaxQuote AST nodes → plain Clojure forms.
Called by runtime paths (run, repl) before eval. Not needed for tooling
(tooling works with AST nodes directly).
raw docstring

meme-lang.formatter.canon

Canonical formatter: width-aware meme output. Composes printer (form → Doc) with render (layout @ target width). Used by meme format CLI command.

Canonical formatter: width-aware meme output.
Composes printer (form → Doc) with render (layout @ target width).
Used by `meme format` CLI command.
raw docstring

meme-lang.formatter.flat

Flat formatter: single-line meme output. Composes printer (form → Doc) with render (layout @ infinite width).

Flat formatter: single-line meme output.
Composes printer (form → Doc) with render (layout @ infinite width).
raw docstring

meme-lang.grammar

Meme language grammar spec.

Maps characters to scanlets — the complete syntactic specification of M-expression syntax as data. Lexlets provide the scanning layer, parselets provide the compound constructs, and the parser engine provides generic factories.

Meme language grammar spec.

Maps characters to scanlets — the complete syntactic specification
of M-expression syntax as data. Lexlets provide the scanning layer,
parselets provide the compound constructs, and the parser engine
provides generic factories.
raw docstring

meme-lang.lexlets

Meme lexical scanlets: character predicates, consume helpers, and trivia consumers.

This file provides the lexical layer for the meme language. The grammar spec in meme-grammar references these functions by name. Generic scanlet builders (atom-scanlet, single-char-scanlet, delimited-scanlet) live in meme.tools.lexer.

Meme lexical scanlets: character predicates, consume helpers,
and trivia consumers.

This file provides the lexical layer for the meme language. The grammar
spec in meme-grammar references these functions by name.
Generic scanlet builders (atom-scanlet, single-char-scanlet, delimited-scanlet)
live in meme.tools.lexer.
raw docstring

meme-lang.parselets

Meme-specific parselets for the Pratt parser.

Contains the compound parselets that handle meme's unique constructs: call adjacency detection, dispatch (#) sub-routing, tilde (~/@), and the M-expression call rule.

Meme-specific parselets for the Pratt parser.

Contains the compound parselets that handle meme's unique constructs:
call adjacency detection, dispatch (#) sub-routing, tilde (~/@),
and the M-expression call rule.
raw docstring

meme-lang.printer

Meme printer: Clojure forms → Doc trees. Builds Wadler-Lindig Doc trees from Clojure forms, handling meme syntax (call notation, sugar, metadata, comments) and Clojure output mode. Delegates to render for Doc algebra and layout.

Meme printer: Clojure forms → Doc trees.
Builds Wadler-Lindig Doc trees from Clojure forms, handling meme syntax
(call notation, sugar, metadata, comments) and Clojure output mode.
Delegates to render for Doc algebra and layout.
raw docstring

meme-lang.repl

Meme-specific REPL. Wires meme stages, error formatting, keyword resolution, and syntax-quote resolution into the generic REPL infrastructure. JVM/Babashka only.

Meme-specific REPL. Wires meme stages, error formatting, keyword resolution,
and syntax-quote resolution into the generic REPL infrastructure.
JVM/Babashka only.
raw docstring

meme-lang.resolve

Value resolution: converts raw token text to Clojure values. All resolution is native — no delegation to read-string.

Value resolution: converts raw token text to Clojure values.
All resolution is native — no delegation to read-string.
raw docstring

meme-lang.run

Meme-specific eval pipeline. Wires meme stages, syntax-quote resolution, and BOM stripping into the generic run infrastructure. JVM/Babashka only.

Meme-specific eval pipeline. Wires meme stages, syntax-quote resolution,
and BOM stripping into the generic run infrastructure.
JVM/Babashka only.
raw docstring

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

meme-lang.values

Shared value → string serialization for the printer and rewrite emitter. Handles atomic Clojure values (strings, numbers, chars, regex, etc.) that both emit paths must render identically.

Shared value → string serialization for the printer and rewrite emitter.
Handles atomic Clojure values (strings, numbers, chars, regex, etc.)
that both emit paths must render identically.
raw 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