Liking cljdoc? Tell your friends :D

parseq.utils

Helpers for dealing with parsers and their results.

Helpers for dealing with parsers and their results.
raw docstring

->failureclj

(->failure msg)
(->failure msg data)

Constructs a parser Failure with optional data.

Constructs a parser Failure with optional data.
raw docstring

all-input-parsed?clj

(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.
raw docstring

complete-success?clj

Alias to all-input-parsed?

Alias to `all-input-parsed?`
raw docstring

failure?clj

Checks if the result of a parse has failed.

Checks if the result of a parse has failed.
raw docstring

match-parsecljmacro

(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`.
raw docstring

parseclj

(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).
raw docstring

success?clj

(success? parse-result)

Checks that the result of a parse has succeeded.

Checks that the result of a parse has succeeded.
raw docstring

valueclj

(value parse-result)

Extracts the value from a successful parse result.

Extracts the value from a successful parse result.
raw docstring

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

× close