JustBash.Parser.Lexer.Error exception (JustBash v0.3.0)

View Source

Structured error for lexer failures.

Raised by tokenize!/1 and returned as {:error, t()} by tokenize/1. Callers can pattern-match on type and construct for programmatic handling.

Summary

Types

construct()

@type construct() ::
  :single_quote
  | :double_quote
  | :backtick
  | :command_substitution
  | :parameter_expansion
  | :arithmetic
  | :expression
  | nil

error_type()

@type error_type() ::
  :unterminated | :nesting_depth | :unexpected_character | :expected_delimiter

t()

@type t() :: %JustBash.Parser.Lexer.Error{
  __exception__: true,
  column: non_neg_integer(),
  construct: construct(),
  line: non_neg_integer(),
  message: String.t(),
  type: error_type()
}