(append-to-parent {:keys [stack] :as parser} & [value])
Given a stack like [[:event-seq] [:note ...]],
if no value
arg is provided, appends the top of the stack to the event
below: [[:event-seq [:note ...]]]
if a value
arg is provided, pops the stack and appends the custom value
to the item below: [[:event-seq 'some-custom-value]]
Given a stack like [[:event-seq] [:note ...]], if no `value` arg is provided, appends the top of the stack to the event below: [[:event-seq [:note ...]]] if a `value` arg is provided, pops the stack and appends the custom value to the item below: [[:event-seq 'some-custom-value]]
(ensure-parsing {:keys [state] :as parser})
If the parser's state is not :parsing, short-circuits the parser so that the current state is passed through until the end.
Otherwise returns nil so that parsing will continue.
If the parser's state is not :parsing, short-circuits the parser so that the current state is passed through until the end. Otherwise returns nil so that parsing will continue.
(propagate-error parser token)
If there was an error in a previous stage of the parsing pipeline, propagate it through and stop parsing.
If there was an error in a previous stage of the parsing pipeline, propagate it through and stop parsing.
(read-token! p t)
Reads one token t
and updates parser p
.
Puts events on (:events-ch p) as they are parsed.
Reads one token `t` and updates parser `p`. Puts events on (:events-ch p) as they are parsed.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close