Liking cljdoc? Tell your friends :D

meander.syntax.epsilon


*env*clj/s

source

*form*clj/s

source

any-node?clj/s

(any-node? x)
source

childrenclj/smultimethod

(children node)

Return a sequential? of all children of node.

Return a sequential? of all children of node.
sourceraw docstring

consolidate-withclj/s

(consolidate-with node)

Collapse all :wth nodes into a single :wth node.

Collapse all :wth nodes into a single :wth node.
sourceraw docstring

default-envclj/s

source

defsyntaxclj/s≠macro

clj
(defsyntax name doc-string? attr-map? [params*] prepost-map? body)
(defsyntax name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?)
cljs
(defsyntax & defn-args)
source (clj)source (cljs)

empty-cat-node?clj/s

(empty-cat-node? x)
source

expand-formclj/s

(expand-form form env)

Expand form with respect to env if possible. Returns the result of expanding form or form unchanged.

Expand `form` with respect to `env` if possible. Returns the result
of expanding `form` or `form` unchanged.
sourceraw docstring

expand-seqclj/smultimethod

(expand-seq seq env)
source

expander-registryclj/s

(expander-registry env)

Return the ::expander-registry of the environment env or nil if it cannot be found.

Return the `::expander-registry` of the environment `env` or `nil`
if it cannot be found.
sourceraw docstring

foldclj/s

(fold f value node)

Same as clojure.core/reduce but specifically for ASTs. f must be a binary (arity 2) function and will receive as arguments the current accumulated value and an AST node. fold is eager and will visit each subnode in node.

Same as clojure.core/reduce but specifically for ASTs. f must be a
binary (arity 2) function and will receive as arguments the current
accumulated value and an AST node. fold is eager and will visit each
subnode in node.
sourceraw docstring

global-expander-registryclj/s

source

global-parser-registryclj/s

source

ground?clj/smultimethod

(ground? node)

true if node is ground i.e. it contains no variables or is not a match operator.

true if node is ground i.e. it contains no variables or is not a
match operator.
sourceraw docstring

lit-formclj/s

(lit-form node)
source

literal?clj/s

(literal? node)

true if node is ground and does not contain :map or :set subnodes, false otherwise.

The constraint that node may not contain :map or :set subnodes is due to the semantics of map and set patterns: they express submap and subsets respectively. Compiling these patterns to literals as part of an equality check would result in false negative matches.

true if node is ground and does not contain :map or :set subnodes,
false otherwise.

The constraint that node may not contain :map or :set subnodes is
due to the semantics of map and set patterns: they express submap
and subsets respectively. Compiling these patterns to literals as
part of an equality check would result in false negative matches.
sourceraw docstring

logic-variablesclj/s

(logic-variables node)

Return all :lvr nodes in node.

Return all :lvr nodes in node.
sourceraw docstring

lvr-node?clj/s

(lvr-node? x)
source

make-ref-mapclj/s

(make-ref-map node)

If node is a node repesenting a with pattern, return a map from reference to pattern node derived from it's bindings, otherwise return an empty map.

If node is a node repesenting a with pattern, return a map from
reference to pattern node derived from it's bindings, otherwise
return an empty map.
sourceraw docstring

make-variable-rename-mapclj/s

(make-variable-rename-map node)
source

max-lengthclj/smultimethod

(max-length node)

The maximum possible length the pattern described by node can be. Note, this multimethod will throw an error whenever node does not have a method to handle it. This behavior is intentional as the implementations should only exist for things which have can have length. The max-length? predicate can be used to detect if node implements max-length.

The maximum possible length the pattern described by `node` can
be. Note, this multimethod will throw an error whenever `node` does
not have a method to handle it. This behavior is intentional as the
implementations should only exist for things which have can have
length. The `max-length?` predicate can be used to detect if `node`
implements `max-length`.
sourceraw docstring

max-length?clj/s

(max-length? x)

true if x implements max-length, false otherwise.

true if `x` implements `max-length`, false otherwise.
sourceraw docstring

memory-variablesclj/s

(memory-variables node)

Return all :mvr nodes in node.

Return all :mvr nodes in node.
sourceraw docstring

min-lengthclj/smultimethod

(min-length node)

The minimum possible length the pattern described by node can be. Note, this multimethod will throw an error whenever node does not have a method to handle it. This behavior is intentional as the implementations should only exist for things which have can have length. The min-length? predicate can be used to detect if node implements min-length.

The minimum possible length the pattern described by `node` can be.
Note, this multimethod will throw an error whenever `node` does not
have a method to handle it. This behavior is intentional as the
implementations should only exist for things which have can have
length. The `min-length?` predicate can be used to detect if `node`
implements `min-length`.
sourceraw docstring

min-length?clj/s

(min-length? x)

true if x implements min-length, false otherwise.

true if `x` implements `min-length`, false otherwise.
sourceraw docstring

mvr-node?clj/s

(mvr-node? x)
source

node?clj/s

(node? x)

true if x is an AST node.

true if x is an AST node.
sourceraw docstring

parseclj/s

(parse form)
(parse form env)

Parse form into an abstract syntax tree (AST) optionally with respect to the environment env.

(parse '(?x1 ?x2 :as ?xs)) ;; => {:tag :seq :as {:tag :lvr :symbol ?xs} :prt {:tag :prt :left {:tag :cat :elements ({:tag :lvr :symbol ?x1} {:tag :lvr :symbol ?x2})} :right {:tag :cat :elements []}}}

Parse `form` into an abstract syntax tree (AST) optionally with
respect to the environment `env`.

(parse '(?x1 ?x2 :as ?xs))
;; =>
{:tag :seq
 :as {:tag :lvr
      :symbol ?xs}
 :prt {:tag :prt
       :left {:tag :cat
              :elements ({:tag :lvr :symbol ?x1}
                         {:tag :lvr :symbol ?x2})}
       :right {:tag :cat
               :elements []}}}
sourceraw docstring

parse-allclj/s

(parse-all forms env)

Apply parse to all forms in the sequence forms.

Apply `parse` to all forms in the sequence `forms`.
sourceraw docstring

parse-seqclj/s

(parse-seq xs env)

Parses a seq? into a :meander.syntax.epsilon/node.

seqs? of the following form are handled specially, all other seqs are parsed as :seq nodes.

(quote <form>) (clojure.core/unquote <form>) (clojure.core/unquote-splicig <form>) (<symbol*> <form_0> ... <form_n>)

where symbol* is a fully qualified symbol with respect to the current namespace.

Parses a seq? into a :meander.syntax.epsilon/node.

seqs? of the following form are handled specially, all other seqs
are parsed as :seq nodes.

  (quote <form>)
  (clojure.core/unquote <form>)
  (clojure.core/unquote-splicig <form>)
  (<symbol*> <form_0> ... <form_n>)

where symbol* is a fully qualified symbol with respect to the
current namespace.
sourceraw docstring

parse-setclj/s

(parse-set s env)
source

parser-registryclj/s

(parser-registry env)

Return the ::parser-registry of the environment env or nil if it cannot be found.

Return the `::parser-registry` of the environment `env` or `nil` if
it cannot be found.
sourceraw docstring

partition-node?clj/s

(partition-node? x)
source

postwalkclj/s

(postwalk f node)
source

postwalk-replaceclj/s

(postwalk-replace smap form)

Same as clojure.walk/postwal-replace but for AST nodes.

Same as clojure.walk/postwal-replace but for AST nodes.
sourceraw docstring

prewalkclj/s

(prewalk f node)
source

prewalk-replaceclj/s

(prewalk-replace smap form)

Same as clojure.walk/prewalk-replace but for AST nodes.

Same as clojure.walk/prewalk-replace but for AST nodes.
sourceraw docstring

proper-subnodesclj/s

(proper-subnodes node)

Return the all subnodes in node excluding node.

Return the all subnodes in node excluding node.
sourceraw docstring

ref-node?clj/s

(ref-node? x)

true if x is a :ref node, false otherwise.

true if x is a :ref node, false otherwise.
sourceraw docstring

referencesclj/s

(references node)

Return all :ref nodes in node.

Return all :ref nodes in node.
sourceraw docstring

register-expanderclj/s

(register-expander symbol f)
source

register-parserclj/s

(register-parser symbol f)
source

rename-refsclj/s

(rename-refs node)

Give all distinct :ref nodes a unique :symbol.

Give all distinct :ref nodes a unique :symbol.
sourceraw docstring

resolve-expanderclj/s

(resolve-expander sym env)

Return the ::expander associated with sym with respect to the environment env.

Return the `::expander` associated with `sym` with respect to the
environment `env`.
sourceraw docstring

resolve-parserclj/s

(resolve-parser sym env)

Return the ::parser associated with sym with respect to the environment env.

Return the `::parser` associated with `sym` with respect to the
environment `env`.
sourceraw docstring

search?clj/smultimethod

(search? node)

true if node represents a search, false otherwise.

true if node represents a search, false otherwise.
sourceraw docstring

subnodesclj/s

(subnodes node)

Return a sequence of all subnodes of node.

Return a sequence of all subnodes of node.
sourceraw docstring

substitute-refsclj/s

(substitute-refs node)
(substitute-refs node ref-map)

Given node and an optional ref-map

Given node and an optional ref-map 
sourceraw docstring

tagclj/s

(tag node)

Return the tag of node.

Return the tag of node.
sourceraw docstring

tail-node?clj/s

(tail-node? x)
source

top-levelclj/s

(top-level node)
source

unparseclj/smultimethod

(unparse node)

In pre-order fashion rewrite a node into a Clojure form.

In pre-order fashion rewrite a node into a Clojure form.
sourceraw docstring

variable-length?clj/s

(variable-length? node)

true if node may have a variable length, false otherwise. Note this function will throw an error if node does not implement methods for both min-length and max-length.

true if node may have a variable length, false otherwise. Note this
function will throw an error if node does not implement methods for
both min-length and max-length.
sourceraw docstring

variable-node?clj/s

(variable-node? x)
source

variablesclj/s

(variables node)

Return all :lvr and :mvr nodes in node.

Return all :lvr and :mvr nodes in node.
sourceraw docstring

walkclj/smultimethod

(walk inner outer node)

Same as clojure.walk/walk but for AST nodes.

Same as clojure.walk/walk but for AST nodes.
sourceraw docstring

windowclj/s

(window node)
source

with-node?clj/s

(with-node? x)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close