Handler
Value members
Inherited methods
Wraps this handler as a "top level" handler, which will inject a SpacTraceElement
(representing the current input or the "EOF" signal)
to any exception is thrown by this handler when calling its step
or finish
methods.
Wraps this handler as a "top level" handler, which will inject a SpacTraceElement
(representing the current input or the "EOF" signal)
to any exception is thrown by this handler when calling its step
or finish
methods.
Used internally by Parser
's parse
methods.
- Inherited from:
- Handler
Convenience function to call step
on a sequence of inputs all at once.
If the step
returns a result, this method will return a Left
containing that result and the remainder of the inputs
that were not consumed.
If the inputs
run out before the handler returns a result from a step
, this method will return a Right
containing the latest state of the handler.
This method will not call the handler's finish()
.
Convenience function to call step
on a sequence of inputs all at once.
If the step
returns a result, this method will return a Left
containing that result and the remainder of the inputs
that were not consumed.
If the inputs
run out before the handler returns a result from a step
, this method will return a Right
containing the latest state of the handler.
This method will not call the handler's finish()
.
In general, you won't call this method directly. Instead, use one of the Parser trait's parse
methods.
- Type parameters:
- C
An
Unconsable
collection, i.e.List
orcats.data.Chain
- In2
Subtype of
In
, orIn
(to satisfy contravariance)
- Value parameters:
- C
Evidence that the
inputs
has ahead/tail
split operation- inputs
A sequence of inputs
- Returns:
Either the handler's result paired with the remaining inputs, or the new handler state
- Inherited from:
- Handler