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)
SourceInstance methods
end_location
Sourceend_location=(end_location : TopDown::Location)
Sourceinspect_with_backtrace(io)
Displays message with backtrace and shows in source the range begin_location:location.
location
Sourcelocation=(location : TopDown::Location)
Sourcemessage
Sourcemessage=(message)
Sourcesource
Sourcesource=(source : String)
Source