Causes this handler to process a context end.
Causes this handler to process a context end.
This method should not be called if isFinished == true
, or
if no corresponding handleContextStart
was called.
An option containing the final output if this handler
became finished as a result of leaving the context, or
None
if the handler is ready for more input.
Causes this handler to process a context start event.
Causes this handler to process a context start event.
This method should not be called if isFinished == true
A Try
containing the new context, or an error originating
from the "context decider"
An option containing the final output if this handler became
finished as a result of entering the new context, or None
if the handler is ready for more input.
Causes this handler to finalize and produce a result.
Causes this handler to finalize and produce a result.
This method should not be called if isFinished
is already true.
The final output of this parser
Causes this handler to process an error.
Causes this handler to process an error.
This method should not be called if isFinished == true
an error to be processed
An option containing the final output if
this handler became finished as a result
of processing the error
, or None
if
the handler is ready for more input.
Causes this handler to process an input element.
Causes this handler to process an input element.
This method should not be called if isFinished == true
an element to be processed
An option containing the final output if
this handler became finished as a result
of processing the input
, or None
if
the handler is ready for more input.
Tells if this handler is finished.
Tells if this handler is finished.
If a handler is finished, its handleX
methods
should no longer be called. Doing so after the
handler finishes will cause undefined behavior.
Typically a handler should be discarded once it
is finished.
whether this handler is finished
(contextSensitiveHandler: StringAdd).self
(contextSensitiveHandler: StringFormat).self
(contextSensitiveHandler: ArrowAssoc[ContextSensitiveHandler[In, Context, Out]]).x
(Since version 2.10.0) Use leftOfArrow
instead
(contextSensitiveHandler: Ensuring[ContextSensitiveHandler[In, Context, Out]]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
Extension of the
Handler
trait that additionally handles entering and exiting a context. A separate component should be responsible for deciding when a context begins or ends. The combination of that decider and this handler forms the basis of aSplitter
's handler.The input type
The context type
The output type