Exception: Steep::AnnotationParser::SyntaxError
- Defined in:
- lib/steep/annotation_parser.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(source:, location:, exn: nil, message: nil) ⇒ SyntaxError
constructor
A new instance of SyntaxError.
Constructor Details
#initialize(source:, location:, exn: nil, message: nil) ⇒ SyntaxError
Returns a new instance of SyntaxError.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/steep/annotation_parser.rb', line 23 def initialize(source:, location:, exn: nil, message: nil) @source = source @location = location if exn = case exn when RBS::ParsingError Diagnostic::Signature::SyntaxError.(exn) else exn. end end super end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
21 22 23 |
# File 'lib/steep/annotation_parser.rb', line 21 def location @location end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
20 21 22 |
# File 'lib/steep/annotation_parser.rb', line 20 def source @source end |