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