ParseErr
is a parser failure carrying byte/line/column position,
an optional unexpected token, and an expected set of labels
gathered from parsers that failed at that position. Render with
Parser.format-error.
empty-at
(Fn [(Ref Cursor a)] ParseErr)
(empty-at cur)
creates a ParseErr at cur with no labels.
expected
(Fn [(Ref ParseErr a)] (Ref (Array String) a))
gets the expected property of a ParseErr.
expected-at
(Fn [(Ref Cursor a), String] ParseErr)
(expected-at cur lbl)
creates a ParseErr at cur with one expected label.
set-expected
(Fn [ParseErr, (Array String)] ParseErr)
sets the expected property of a ParseErr.
set-expected!
(Fn [(Ref ParseErr a), (Array String)] ())
sets the expected property of a ParseErr in place.
set-line!
(Fn [(Ref ParseErr a), Int] ())
sets the line property of a ParseErr in place.
set-unexpected
(Fn [ParseErr, (Maybe String)] ParseErr)
sets the unexpected property of a ParseErr.
set-unexpected!
(Fn [(Ref ParseErr a), (Maybe String)] ())
sets the unexpected property of a ParseErr in place.
unexpected
(Fn [(Ref ParseErr a)] (Ref (Maybe String) a))
gets the unexpected property of a ParseErr.
update-col
(Fn [ParseErr, (Ref (Fn [Int] Int a) b)] ParseErr)
updates the col property of a ParseErr using a function f.
update-expected
(Fn [ParseErr, (Ref (Fn [(Array String)] (Array String) a) b)] ParseErr)
updates the expected property of a ParseErr using a function f.
update-line
(Fn [ParseErr, (Ref (Fn [Int] Int a) b)] ParseErr)
updates the line property of a ParseErr using a function f.
update-pos
(Fn [ParseErr, (Ref (Fn [Int] Int a) b)] ParseErr)
updates the pos property of a ParseErr using a function f.
update-unexpected
(Fn [ParseErr, (Ref (Fn [(Maybe String)] (Maybe String) a) b)] ParseErr)
updates the unexpected property of a ParseErr using a function f.