A callback type for error productions.
It gets passed the target
and index
where an error occured and returns a new
semantic error value for it to be added to the returned ParseError of
the parser.
It is used as the type of callback for TokenParser parsers that produce ParseError outcomes.
A new semantic error value
The target that was parsed.
The index in target
where an error was found.
The type of the semantic error value returned.