Optimized SGR (Select Graphic Rendition) processor for ANSI escape sequences. Uses compile-time optimizations and pattern matching for maximum performance.
Summary
Functions
Processes SGR parameters and applies them to the current style.
Processes already-parsed SGR parameters, as produced by
Raxol.Terminal.Commands.CommandsParser.parse_params/1: a list mixing
plain integer codes with colon-subparameter groups (nested lists, e.g.
[4, 3] for the raw sequence 4:3) and nil placeholders for empty
segments/slots.
Functions
@spec handle_sgr(binary(), Raxol.Terminal.ANSI.TextFormatting.t()) :: Raxol.Terminal.ANSI.TextFormatting.t()
Processes SGR parameters and applies them to the current style.
@spec process_params(list(), Raxol.Terminal.ANSI.TextFormatting.t()) :: Raxol.Terminal.ANSI.TextFormatting.t()
Processes already-parsed SGR parameters, as produced by
Raxol.Terminal.Commands.CommandsParser.parse_params/1: a list mixing
plain integer codes with colon-subparameter groups (nested lists, e.g.
[4, 3] for the raw sequence 4:3) and nil placeholders for empty
segments/slots.