Skip to content

raise parse error

Mojo function 🡭

def raise_parse_error(ctx: ParseContext, message: String, snippet: String = "")

Format a ParseError with context and raise it. Never returns.

All parsers should call this instead of constructing error strings inline.

Args:

  • ctx (ParseContext)
  • message (String)
  • snippet (String)

Raises: