Raxol.Terminal.Parser.State.Manager (Raxol v0.4.0)
View SourceManages parser state transitions and state-specific functionality for the terminal emulator. This module provides a clean interface for managing the parser's state machine and delegating to appropriate state handlers.
Summary
Functions
Appends a byte to the intermediates buffer.
Appends a byte to the params buffer.
Appends a byte to the payload buffer.
Gets the current parser state.
Creates a new parser state with default values.
Processes input in the current parser state. Returns the updated emulator and parser state.
Clears all buffers and resets the state to ground.
Sets the G-set being designated.
Sets the final byte for the current sequence.
Sets the parser state to a new value.
Transitions to a new parser state, clearing relevant buffers.
Functions
Appends a byte to the intermediates buffer.
Appends a byte to the params buffer.
Appends a byte to the payload buffer.
Gets the current parser state.
@spec new() :: map()
Creates a new parser state with default values.
@spec process_input(Raxol.Terminal.Emulator.t(), map(), binary()) :: {:continue, Raxol.Terminal.Emulator.t(), map(), binary()} | {:incomplete, Raxol.Terminal.Emulator.t(), map()} | {:handled, Raxol.Terminal.Emulator.t()}
Processes input in the current parser state. Returns the updated emulator and parser state.
Clears all buffers and resets the state to ground.
@spec set_designating_gset(map(), non_neg_integer()) :: map()
Sets the G-set being designated.
Sets the final byte for the current sequence.
Sets the parser state to a new value.
Transitions to a new parser state, clearing relevant buffers.