Expected
is the set of labels carried by a ParseErr. The
common case (a single failing primitive) uses One to skip a
1-element Array allocation; merged failures collected by choice
use Many.
append-into
(Fn [(Array String), (Ref Expected a)] (Array String))
(append-into acc e)
drains the labels in e onto the end of acc,
returning the new array. Used by Parser.choice to accumulate
labels across failed alternatives without going through
to-array's allocation in the One case.
delete
(Fn [Expected] ())
deletes a Expected. This should usually not be called manually.
to-array
(Fn [(Ref Expected a)] (Array String))
(to-array e)
materializes an Expected as an Array String.
Allocates a 1-element array for the One case.