Lua.Parser.Error (Lua v1.0.0-rc.0)
View SourceBeautiful error reporting for the Lua parser.
Provides detailed error messages with:
- Source code context with line numbers
- Visual indicators pointing to the error location
- Helpful suggestions for common mistakes
- Multiple error reporting
Summary
Functions
Creates an error for expected token.
Formats an error into a beautiful multi-line string with context.
Formats multiple errors together.
Creates a new error.
Creates an error for unclosed delimiter.
Creates an error for unexpected end of input.
Creates an error for unexpected token.
Types
@type error_type() ::
:unexpected_token
| :unexpected_end
| :expected_token
| :unclosed_delimiter
| :invalid_syntax
| :lexer_error
| :multiple_errors
@type position() :: Lua.AST.Meta.position()
Functions
Creates an error for expected token.
Formats an error into a beautiful multi-line string with context.
Formats multiple errors together.
@spec new(error_type(), String.t(), position() | nil, keyword()) :: t()
Creates a new error.
Creates an error for unclosed delimiter.
Creates an error for unexpected end of input.
Creates an error for unexpected token.