Environment (&env) used when parsing pattern syntax.
Environment (&env) used when parsing pattern syntax.
(any-symbol? x)
true if x is a symbol beginning with _.
true if x is a symbol beginning with _.
(children node)
Return a sequence of all subnodes of node.
Return a sequence of all subnodes of node.
(defsyntax name docstring? meta? arglist & body)
(defsyntax &form &env & args)
EXPERIMENTAL Like defn but for defining new pattern syntax by extending the parser. When parsing, if a seq is encountered starting with a symbol which can be resolved to the created var then the tail of the seq is applied to the var and the result is parsed.
Example
(defsyntax re [regex] `(~'pred (fn [s#] (and (string? s#) (re-matches ~regex s#)))))
(require '[meander.match.alpha :as r.match])
(r.match "elf" (re #"[a-z]+") :okay!) ;; => :okay
EXPERIMENTAL Like defn but for defining new pattern syntax by extending the parser. When parsing, if a seq is encountered starting with a symbol which can be resolved to the created var then the tail of the seq is applied to the var and the result is parsed. Example (defsyntax re [regex] `(~'pred (fn [s#] (and (string? s#) (re-matches ~regex s#))))) (require '[meander.match.alpha :as r.match]) (r.match "elf" (re #"[a-z]+") :okay!) ;; => :okay
(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.
(logic-variable-form? x)
true if x is in the form of a logic variable i.e. a simple symbol with a name beginning with ?.
true if x is in the form of a logic variable i.e. a simple symbol with a name beginning with \?.
(logic-variables node)
Return all :lvr nodes in node.
Return all :lvr nodes in node.
(memory-variable-form? x)
true if x is in the form of a memory variable i.e. a simple symbol with a name beginning with !.
true if x is in the form of a memory variable i.e. a simple symbol with a name beginning with \!.
(memory-variables node)
Return all :mvr nodes in node.
Return all :mvr nodes in node.
(pattern-op-dispatch x)
Dispatch function for pattern-op.
Dispatch function for pattern-op.
(proper-subnodes node)
Return the all subnodes in node excluding node.
Return the all subnodes in node excluding node.
(quote-form? x)
true if x is in the form (quote x).
true if x is in the form (quote x).
(subnodes node)
Return a sequence of all subnodes of node.
Return a sequence of all subnodes of node.
(unparse node)
In pre-order fashion rewrite a node into a Clojure form.
In pre-order fashion rewrite a node into a Clojure form.
(unquote-form? x)
true if x is in the form (clojure.core/unquote x).
true if x is in the form (clojure.core/unquote x).
(unquote-splicing-form? x)
true if x is in the form (clojure.core/unquote-splicing x).
true if x is in the form (clojure.core/unquote-splicing x).
(variable-length? node)
true if node may have a variable length.
true if node may have a variable length.
(variables node)
Return all :lvr and :mvr nodes in node.
Return all :lvr and :mvr nodes in node.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close