Helpers for dealing with parsers and their results.
Helpers for dealing with parsers and their results.
(->failure msg)
(->failure msg data)
Constructs a parser Failure with optional data.
Constructs a parser Failure with optional data.
(all-input-parsed? parse-result)
Checks that the result of a parse has successfully parsed all the input.
Checks that the result of a parse has successfully parsed all the input.
Checks if the result of a parse has failed.
Checks if the result of a parse has failed.
(match-parse parse-result
success?-binds
success?-body
failure?-bind
failure?-body)
Evaluates parse-result
once. If it is a success?
, destructures the parse result
with success?-binds
and evaluates success?-body
. If it is a failure?
,
destructures the parse result with failure?-binds
and evaluates failure?-body
.
Evaluates `parse-result` once. If it is a `success?`, destructures the parse result with `success?-binds` and evaluates `success?-body`. If it is a `failure?`, destructures the parse result with `failure?-binds` and evaluates `failure?-body`.
(parse p input)
Apply parser p
to input
(i.e. helper to run the parse).
Apply parser `p` to `input` (i.e. helper to run the parse).
(success? parse-result)
Checks that the result of a parse has succeeded.
Checks that the result of a parse has succeeded.
(value parse-result)
Extracts the value from a successful parse result.
Extracts the value from a successful parse result.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close