class RBS::ParsingError

Attributes

error_message[R]
location[R]
token_type[R]

Public Class Methods

new(location, error_message, token_type) click to toggle source
Calls superclass method
# File rbs-3.2.1/lib/rbs/errors.rb, line 58
def initialize(location, error_message, token_type)
  @location = location
  @error_message = error_message
  @token_type = token_type

  super "#{Location.to_string location}: Syntax error: #{error_message}, token=`#{location.source}` (#{token_type})"
end

Public Instance Methods

error_value() click to toggle source
# File rbs-3.2.1/lib/rbs/errors.rb, line 66
def error_value
  RBS.print_warning {
    "#{self.class.name}#error_value is deprecated and will be deleted in RBS 2.0. Consider using `location.source` instead."
  }
  location.source
end
token_str() click to toggle source
# File rbs-3.2.1/lib/rbs/errors.rb, line 73
def token_str
  RBS.print_warning {
    "#{self.class.name}#token_str is deprecated and will be deleted in RBS 2.0. Consider using `token_type` instead."
  }
  token_type
end