parse_error

Function parse_error 

Source
pub fn parse_error(
    input: &str,
    offset: usize,
    context: impl Into<String>,
) -> Error
Expand description

Create a parse error with truncated input snippet (max 50 chars).

The snippet is limited to 50 characters to keep error messages manageable.

ยงParameters

  • input: The input string being parsed
  • offset: Byte offset where the error occurred
  • context: Description of what was expected