A namespace for those quick "I need something better than a regex"-moments.
A namespace for those quick "I need something better than a regex"-moments.
(parse definition text)
Parse text
using the string- or data parser definition
.
The predefined parsers from the built-ins
namespace are available.
A success result is transformed such that the attributes of each node are replaced by the matched string. For example:
(parse "'alice' (' and ' (:who word))+"
"alice and bob and eve")
=> [nil "alice and bob and eve"
[:who "bob"]
[:who "eve"]]
When the result is an error, nil is returned.
Parse `text` using the string- or data parser `definition`. The predefined parsers from the `built-ins` namespace are available. A success result is transformed such that the attributes of each node are replaced by the matched string. For example: (parse "'alice' (' and ' (:who word))+" "alice and bob and eve") => [nil "alice and bob and eve" [:who "bob"] [:who "eve"]] When the result is an error, nil is returned.
(transform result text)
Transform a success result to the 'quick' format, nil otherwise.
Transform a success result to the 'quick' format, nil otherwise.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close