class TopDown::Parser::SyntaxError
- TopDown::Parser::SyntaxError
- Exception
- Reference
- Object
Overview
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.
Defined in:
parser/syntax_error.crConstructors
Instance Method Summary
- #end_location : TopDown::Location
- #end_location=(end_location : TopDown::Location)
- #inspect_with_backtrace(io)
- #location : TopDown::Location
- #location=(location : TopDown::Location)
- #message : String?
- #message=(message)
- #source : String
- #source=(source : String)
-
#to_s(io)
Displays
#messageand shows in#sourcethe range#location:#end_location.
Constructor Detail
def self.new(message : String, source : String, location : Location, end_location : Location = location)
#
Instance Method Detail
def inspect_with_backtrace(io)
#