Raxol.Terminal.Escape.Parsers.CSIParser (Raxol v2.0.1)

View Source

Parser for CSI (Control Sequence Introducer) escape sequences.

CSI sequences are introduced by ESC [ and contain various terminal control commands for cursor movement, text formatting, screen manipulation, etc.

Summary

Functions

Parses a CSI sequence after the ESC [ prefix.

Functions

parse(input)

@spec parse(String.t()) ::
  {:ok, term(), String.t()}
  | {:incomplete, String.t()}
  | {:error, atom(), String.t()}

Parses a CSI sequence after the ESC [ prefix.

Parameters

  • input: The input string after ESC [

Returns

  • {:ok, command, remaining} - Successfully parsed command
  • {:incomplete, input} - Input is incomplete, need more data
  • {:error, reason, input} - Parse error