(expecting err msg)
Returns new instance of the parser error err
with added “expected item”
message. Ignores nil msg
and returns just err
.
Returns new instance of the parser error `err` with added “expected item” message. Ignores nil `msg` and returns just `err`.
(render-object obj)
Returns string representation of the obj
in parser error messages.
Returns string representation of the `obj` in parser error messages.
(merge-errors e1 e2)
Returns parser error with messages from another two errors.
Returns parser error with messages from another two errors.
(message state msg)
Returns parser error with some general parser message msg
, generated by the
fail
combinator.
Returns parser error with some general parser message `msg`, generated by the `fail` combinator.
(render-messages messages)
(render-messages {:keys [unknown expecting unexpected end-of-input or] :as dict}
messages)
(render-messages messages)
(render-messages dict messages)
The standard function for showing error messages. Formats a list of error messages in English. The resulting string will be formatted like:
Example:
unexpected UnExpect2 or UnExpect1
expecting Expect3, Expect2 or Expect1
Message2 or Message1
The standard function for showing error messages. Formats a list of error messages in English. The resulting string will be formatted like: - unexpected _{The first UnExpect or a SysUnExpect message}_ - expecting _{comma separated list of Expect messages}_ - _{comma separated list of Message messages}_ Example: unexpected UnExpect2 or UnExpect1 expecting Expect3, Expect2 or Expect1 Message2 or Message1
(sys-unexpected state msg)
Returns “unexpected input” parser error with message msg
.
Returns “unexpected input” parser error with message `msg`.
(sys-unexpected-eof state)
Returns “unexpected input” parser error in case of end of input.
Returns “unexpected input” parser error in case of end of input.
(unexpected state msg)
Returns “unexpected item” parser error with message msg
.
Returns “unexpected item” parser error with message `msg`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close