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.

col

instantiate

(Fn [(Ref ParseErr a)] (Ref Int a))

gets the col property of a ParseErr.

copy

instantiate

(Fn [(Ref ParseErr a)] ParseErr)

copies a ParseErr.

delete

instantiate

(Fn [ParseErr] ())

deletes a ParseErr. Should usually not be called manually.

empty-at

defn

(Fn [(Ref Cursor a)] ParseErr)

                        (empty-at cur)
                    

creates a ParseErr at cur with no labels.

expected

instantiate

(Fn [(Ref ParseErr a)] (Ref (Array String) a))

gets the expected property of a ParseErr.

expected-at

defn

(Fn [(Ref Cursor a), String] ParseErr)

                        (expected-at cur lbl)
                    

creates a ParseErr at cur with one expected label.

init

instantiate

(Fn [Int, Int, Int, (Maybe String), (Array String)] ParseErr)

creates a ParseErr.

line

instantiate

(Fn [(Ref ParseErr a)] (Ref Int a))

gets the line property of a ParseErr.

pos

instantiate

(Fn [(Ref ParseErr a)] (Ref Int a))

gets the pos property of a ParseErr.

prn

instantiate

(Fn [(Ref ParseErr a)] String)

converts a ParseErr to a string.

set-col

instantiate

(Fn [ParseErr, Int] ParseErr)

sets the col property of a ParseErr.

set-col!

instantiate

(Fn [(Ref ParseErr a), Int] ())

sets the col property of a ParseErr in place.

set-expected

instantiate

(Fn [ParseErr, (Array String)] ParseErr)

sets the expected property of a ParseErr.

set-expected!

instantiate

(Fn [(Ref ParseErr a), (Array String)] ())

sets the expected property of a ParseErr in place.

set-line

instantiate

(Fn [ParseErr, Int] ParseErr)

sets the line property of a ParseErr.

set-line!

instantiate

(Fn [(Ref ParseErr a), Int] ())

sets the line property of a ParseErr in place.

set-pos

instantiate

(Fn [ParseErr, Int] ParseErr)

sets the pos property of a ParseErr.

set-pos!

instantiate

(Fn [(Ref ParseErr a), Int] ())

sets the pos property of a ParseErr in place.

set-unexpected

instantiate

(Fn [ParseErr, (Maybe String)] ParseErr)

sets the unexpected property of a ParseErr.

set-unexpected!

instantiate

(Fn [(Ref ParseErr a), (Maybe String)] ())

sets the unexpected property of a ParseErr in place.

str

instantiate

(Fn [(Ref ParseErr a)] String)

converts a ParseErr to a string.

unexpected

instantiate

(Fn [(Ref ParseErr a)] (Ref (Maybe String) a))

gets the unexpected property of a ParseErr.

update-col

instantiate

(Fn [ParseErr, (Ref (Fn [Int] Int a) b)] ParseErr)

updates the col property of a ParseErr using a function f.

update-expected

instantiate

(Fn [ParseErr, (Ref (Fn [(Array String)] (Array String) a) b)] ParseErr)

updates the expected property of a ParseErr using a function f.

update-line

instantiate

(Fn [ParseErr, (Ref (Fn [Int] Int a) b)] ParseErr)

updates the line property of a ParseErr using a function f.

update-pos

instantiate

(Fn [ParseErr, (Ref (Fn [Int] Int a) b)] ParseErr)

updates the pos property of a ParseErr using a function f.

update-unexpected

instantiate

(Fn [ParseErr, (Ref (Fn [(Maybe String)] (Maybe String) a) b)] ParseErr)

updates the unexpected property of a ParseErr using a function f.