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

clj->formsclj

(clj->forms clj-src)

Read Clojure source string, return a vector of forms. JVM/Babashka only — Clojure's reader is needed for full form support.

Read Clojure source string, return a vector of forms.
JVM/Babashka only — Clojure's reader is needed for full form support.
sourceraw docstring

clj->memeclj

(clj->meme clj-src)

Convert Clojure source to meme. JVM only.

Convert Clojure source to meme. JVM only.
sourceraw docstring

format-memeclj/s

(format-meme source opts)

Format meme source text. Reads source, formats via canonical formatter.

Format meme source text. Reads source, formats via canonical formatter.
sourceraw docstring

format-meme-formsclj/s

(format-meme-forms forms)
(format-meme-forms forms opts)

Format Clojure forms as canonical meme source string (multi-line, indented).

opts keys: :width — target line width (int, default 80)

Format Clojure forms as canonical meme source string (multi-line, indented).

opts keys:
  :width  — target line width (int, default 80)
sourceraw docstring

forms->cljclj/s

(forms->clj forms)

Print Clojure forms as Clojure source string with reader sugar.

Print Clojure forms as Clojure source string with reader sugar.
sourceraw docstring

forms->memeclj/s

(forms->meme forms)

Print Clojure forms as meme source string (single-line per form). Takes a SEQUENCE of forms (vector or seq), not a single form.

Print Clojure forms as meme source string (single-line per form).
Takes a SEQUENCE of forms (vector or seq), not a single form.
sourceraw docstring

lang-mapclj/s

Command map for the meme lang. :form-shape is the lang-owned semantic vocabulary — tools (formatter, future LSP/lint) consume it to know how this lang decomposes its special forms.

Command map for the meme lang.
:form-shape is the lang-owned semantic vocabulary — tools (formatter,
future LSP/lint) consume it to know how this lang decomposes its
special forms.
sourceraw docstring

meme->cljclj/s

(meme->clj meme-src)
(meme->clj meme-src opts)

Convert meme source to Clojure source string (lossless by default).

Reader conditionals are preserved as #?(...) in the output rather than being evaluated at the current platform — faithful for .cljc conversion. For the eval-time value, use run-string instead.

opts: same as meme->forms (:resolve-keyword, :resolve-symbol).

Convert meme source to Clojure source string (lossless by default).

Reader conditionals are preserved as `#?(...)` in the output rather than
being evaluated at the current platform — faithful for `.cljc` conversion.
For the eval-time value, use `run-string` instead.

opts: same as `meme->forms` (`:resolve-keyword`, `:resolve-symbol`).
sourceraw docstring

meme->formsclj/s

(meme->forms s)
(meme->forms s opts)

Read meme source string. Returns a vector of Clojure forms. step-parse → step-read

Reader conditionals (#?, #?@) are always returned as MemeReaderConditional records. To evaluate them for the current platform, compose meme-lang.stages/step-evaluate-reader-conditionals after reading, or use run-string / run-file (which do so automatically). The :read-cond option is no longer accepted — passing it throws :meme-lang/deprecated-opt.

opts keys: :resolve-keyword — fn to resolve auto-resolve keywords (::kw) :resolve-symbol — fn to resolve symbols in syntax-quote expansion :grammar — custom Pratt grammar spec (advanced)

Read meme source string. Returns a vector of Clojure forms.
step-parse → step-read

Reader conditionals (`#?`, `#?@`) are always returned as
`MemeReaderConditional` records. To evaluate them for the current
platform, compose `meme-lang.stages/step-evaluate-reader-conditionals`
after reading, or use `run-string` / `run-file` (which do so
automatically). The `:read-cond` option is no longer accepted —
passing it throws `:meme-lang/deprecated-opt`.

opts keys:
  :resolve-keyword  — fn to resolve auto-resolve keywords (::kw)
  :resolve-symbol   — fn to resolve symbols in syntax-quote expansion
  :grammar          — custom Pratt grammar spec (advanced)
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