Token vector → tagged tree for the rewrite-based M→S pipeline. Produces a tree with explicit m-call nodes for adjacency-based calls, structural tags (bracket, brace, set-lit, anon-fn), and prefix markers (meme/quote, meme/deref, etc.).
This is the bridge between the shared tokenizer and the rewrite engine. The existing parser (meme.alpha.parse.reader) does tree-building and M→S transformation in one pass. This module separates them: build a raw tagged tree here, then let rewrite rules handle the rest.
Token vector → tagged tree for the rewrite-based M→S pipeline. Produces a tree with explicit m-call nodes for adjacency-based calls, structural tags (bracket, brace, set-lit, anon-fn), and prefix markers (meme/quote, meme/deref, etc.). This is the bridge between the shared tokenizer and the rewrite engine. The existing parser (meme.alpha.parse.reader) does tree-building and M→S transformation in one pass. This module separates them: build a raw tagged tree here, then let rewrite rules handle the rest.
(build-tree tokens pos)Build a tagged tree node from tokens starting at pos. Returns [node new-pos].
Build a tagged tree node from tokens starting at pos. Returns [node new-pos].
(rewrite-parser tokens _opts _source)Parser that conforms to the pipeline contract: (fn [tokens opts source] → forms). Uses the rewrite-based pipeline: tokens → tagged tree → rules → structures. Drop-in replacement for meme.alpha.parse.reader/read-meme-string-from-tokens.
Parser that conforms to the pipeline contract: (fn [tokens opts source] → forms). Uses the rewrite-based pipeline: tokens → tagged tree → rules → structures. Drop-in replacement for meme.alpha.parse.reader/read-meme-string-from-tokens.
(tokens->tree tokens)Convert a flat token vector to a tagged tree. Returns a vector of top-level forms.
Convert a flat token vector to a tagged tree. Returns a vector of top-level 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 |