Exception: RBS::ParsingError
- Includes:
- DetailedMessageable
- Defined in:
- lib/rbs/errors.rb
Instance Attribute Summary collapse
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#token_type ⇒ Object
readonly
Returns the value of attribute token_type.
Instance Method Summary collapse
-
#initialize(location, error_message, token_type) ⇒ ParsingError
constructor
A new instance of ParsingError.
Methods included from DetailedMessageable
Constructor Details
#initialize(location, error_message, token_type) ⇒ ParsingError
Returns a new instance of ParsingError.
58 59 60 61 62 63 64 |
# File 'lib/rbs/errors.rb', line 58 def initialize(location, , token_type) @location = location @error_message = @token_type = token_type super "#{Location.to_string location}: Syntax error: #{}, token=`#{location.source}` (#{token_type})" end |
Instance Attribute Details
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
55 56 57 |
# File 'lib/rbs/errors.rb', line 55 def @error_message end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
54 55 56 |
# File 'lib/rbs/errors.rb', line 54 def location @location end |
#token_type ⇒ Object (readonly)
Returns the value of attribute token_type.
56 57 58 |
# File 'lib/rbs/errors.rb', line 56 def token_type @token_type end |