class Prism::ParseError
This represents an error that was encountered during parsing.
Attributes
location[R]
A Location
object representing the location of this error in the source.
message[R]
The message associated with this error.
Public Class Methods
new(message, location)
click to toggle source
Create a new error object with the given message and location.
# File prism/parse_result.rb, line 291 def initialize(message, location) @message = message @location = location end
Public Instance Methods
deconstruct_keys(keys)
click to toggle source
Implement the hash pattern matching interface for ParseError
.
# File prism/parse_result.rb, line 297 def deconstruct_keys(keys) { message: message, location: location } end
inspect()
click to toggle source
Returns a string representation of this error.
# File prism/parse_result.rb, line 302 def inspect "#<Prism::ParseError @message=#{@message.inspect} @location=#{@location.inspect}>" end