Rewrite rule sets for S→M and M→S transformations. Each direction is a vector of rules for meme.rewrite/rewrite.
Rewrite rule sets for S→M and M→S transformations. Each direction is a vector of rules for meme.rewrite/rewrite.
Rules that convert m-call nodes back to S-expression lists.
Rules that convert m-call nodes back to S-expression lists.
(rewrite-inside-reader-conditionals rewrite-fn form)Walk a form tree and apply rewrite-fn to values inside ReaderConditional objects. The rewrite engine doesn't descend into ReaderConditionals (they're not sequential), so this is needed to e.g. apply S→M rules inside #?(:clj ...) branches.
Walk a form tree and apply rewrite-fn to values inside ReaderConditional objects. The rewrite engine doesn't descend into ReaderConditionals (they're not sequential), so this is needed to e.g. apply S→M rules inside #?(:clj ...) branches.
Rules that tag S-expression calls as m-call nodes. List patterns only match lists (not vectors) — the engine distinguishes them. M13: extended to accept nil, true, false as heads — meme spec says 'any value can be a head': nil(1 2) → (nil 1 2), true(:a) → (true :a). Numbers and strings are NOT included because (42 x) in Clojure is data (not a call), and tagging them would break clj→meme→clj vendor roundtrips.
Rules that tag S-expression calls as m-call nodes. List patterns only match lists (not vectors) — the engine distinguishes them. M13: extended to accept nil, true, false as heads — meme spec says 'any value can be a head': nil(1 2) → (nil 1 2), true(:a) → (true :a). Numbers and strings are NOT included because (42 x) in Clojure is data (not a call), and tagging them would break clj→meme→clj vendor roundtrips.
(transform-structures form)(transform-structures form opts)Walk a tree and convert structural tags to Clojure data/AST nodes. With opts {:read-cond :preserve}, reader conditionals are preserved as ReaderConditional objects instead of being evaluated.
Walk a tree and convert structural tags to Clojure data/AST nodes.
With opts {:read-cond :preserve}, reader conditionals are preserved
as ReaderConditional objects instead of being evaluated.Rules that flatten tagged tree nodes to Clojure forms.
Rules that flatten tagged tree nodes to Clojure forms.
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 |