class

TopDown::Parser::SyntaxError

Inherits Exception < Reference < Object

Exception raised by the parser during Parser#parse and all instantiation of Parser.parse!.

Contains source and location information, which are displayed when the error is dump.

Use Parser#raise_syntax_error to raise a SyntaxError directly at parser location.

Constructors

new(message : String, source : String, location : Location, end_location : Location = location)
Source

Instance methods

end_location
Source
end_location=(end_location : TopDown::Location)
Source
inspect_with_backtrace(io)

Displays message with backtrace and shows in source the range begin_location:location.

Source
location
Source
location=(location : TopDown::Location)
Source
message
Source
message=(message)
Source
source
Source
source=(source : String)
Source
to_s(io)

Displays message and shows in source the range location:end_location.

Source