Shared form-level predicates and constructors. Cross-stage contracts that both the parser and printer depend on.
Shared form-level predicates and constructors. Cross-stage contracts that both the parser and printer depend on.
(build-anon-fn-params param-set)Build [%1 %2 ...] or [%1 & %&] param vector from collected param types.
Build [%1 %2 ...] or [%1 & %&] param vector from collected param types.
(deferred-auto-keyword raw)Wrap a :: keyword string as a deferred eval form. Returns a MemeAutoKeyword record that the printer can recognize unambiguously and the expander converts to (clojure.core/read-string "::foo") before eval.
Wrap a :: keyword string as a deferred eval form. Returns a MemeAutoKeyword record that the printer can recognize unambiguously and the expander converts to (clojure.core/read-string "::foo") before eval.
(deferred-auto-keyword->form ak)Convert a MemeAutoKeyword to an eval-able list form. C65: use platform-appropriate read-string (clojure.core on JVM, cljs.reader on CLJS).
Convert a MemeAutoKeyword to an eval-able list form. C65: use platform-appropriate read-string (clojure.core on JVM, cljs.reader on CLJS).
(deferred-auto-keyword-raw form)Extract the raw :: keyword string from a deferred form. Caller must check deferred-auto-keyword? first.
Extract the raw :: keyword string from a deferred form. Caller must check deferred-auto-keyword? first.
(deferred-auto-keyword? form)Is form a deferred auto-resolve keyword produced by the reader?
Is form a deferred auto-resolve keyword produced by the reader?
(find-invalid-percent-symbols form)Walk form finding first symbol that looks like a % param but isn't valid. RT3-F13: %-1, %foo, etc. Returns first found or nil.
Walk form finding first symbol that looks like a % param but isn't valid. RT3-F13: %-1, %foo, etc. Returns first found or nil.
(find-percent-params form)Walk form collecting % param types. Skips nested (fn ...) bodies.
Walk form collecting % param types. Skips nested (fn ...) bodies.
Metadata keys used internally by the meme pipeline. Excluded when checking for user-visible metadata. Both :col (meme tokenizer) and :column (Clojure reader) are included so stripping works regardless of which reader produced the metadata.
Metadata keys used internally by the meme pipeline. Excluded when checking for user-visible metadata. Both :col (meme tokenizer) and :column (Clojure reader) are included so stripping works regardless of which reader produced the metadata.
(invalid-percent-symbol? sym)Return true if sym looks like a % param but isn't valid. RT3-F13: catches %-1, %foo, %1a, etc. Clojure rejects these.
Return true if sym looks like a % param but isn't valid. RT3-F13: catches %-1, %foo, %1a, etc. Clojure rejects these.
(make-reader-conditional form splicing?)Construct a reader conditional. Portable: uses native type on JVM, MemeReaderConditional on CLJS.
Construct a reader conditional. Portable: uses native type on JVM, MemeReaderConditional on CLJS.
Maximum nesting depth for both the recursive-descent parser and the rewrite tree builder. Guards against stack overflow on deeply nested input.
Maximum nesting depth for both the recursive-descent parser and the rewrite tree builder. Guards against stack overflow on deeply nested input.
(meme-reader-conditional? x)Is x a reader conditional? Portable across JVM and CLJS.
Is x a reader conditional? Portable across JVM and CLJS.
(normalize-bare-percent form)Replace bare % with %1 in form. Skips nested (fn ...) bodies.
Replace bare % with %1 in form. Skips nested (fn ...) bodies.
Internal metadata keys that encode the user's notation choices. Must survive metadata stripping so the printer can reconstruct the original syntax (e.g. #:ns{} maps, set insertion order, quote sugar).
Internal metadata keys that encode the user's notation choices.
Must survive metadata stripping so the printer can reconstruct
the original syntax (e.g. #:ns{} maps, set insertion order, quote sugar).(percent-param-type sym)If sym is a % parameter symbol, return its type: :bare, :rest, or the integer N. Returns nil otherwise.
If sym is a % parameter symbol, return its type: :bare, :rest, or the integer N. Returns nil otherwise.
(raw? x)True if x is a MemeRaw wrapper (preserves alternate notation for roundtrip).
True if x is a MemeRaw wrapper (preserves alternate notation for roundtrip).
(rc-form rc)Get the form list from a reader conditional.
Get the form list from a reader conditional.
(rc-splicing? rc)Is this a splicing reader conditional (#?@)?
Is this a splicing reader conditional (#?@)?
(restore-bare-percent form)Replace %1 with % in a form tree. Used when :meme-lang/bare-percent metadata indicates the user wrote bare % (normalized to %1 for eval correctness). Skips nested (fn ...) bodies — matches normalize-bare-percent guard.
Replace %1 with % in a form tree. Used when :meme-lang/bare-percent metadata indicates the user wrote bare % (normalized to %1 for eval correctness). Skips nested (fn ...) bodies — matches normalize-bare-percent guard.
(strip-internal-meta m)Remove internal meme metadata keys, returning only user-visible metadata.
Remove internal meme metadata keys, returning only user-visible metadata.
(syntax-quote? x)Is x a syntax-quote AST node?
Is x a syntax-quote AST node?
(unquote-splicing? x)Is x an unquote-splicing AST node?
Is x an unquote-splicing AST node?
(walk-anon-fn-body f form)Generic walker over anonymous function body forms. Skips nested (fn ...) bodies. Handles AST node types (raw, syntax-quote, unquote, unquote-splicing), maps, sets, tagged literals, seqs, and vectors.
f is called on every non-container form and returns the walked result.
For containers, the walker recurses and rebuilds the structure.
Use this to avoid duplicating the form-type dispatch across multiple walkers.
Generic walker over anonymous function body forms. Skips nested (fn ...) bodies. Handles AST node types (raw, syntax-quote, unquote, unquote-splicing), maps, sets, tagged literals, seqs, and vectors. `f` is called on every non-container form and returns the walked result. For containers, the walker recurses and rebuilds the structure. Use this to avoid duplicating the form-type dispatch across multiple walkers.
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 |