Class
This represents a warning that was encountered during parsing.
Attributes
Read
The message associated with this warning.
Class Methods
lib/prism/parse_result.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/prism/parse_result.rb, line 341
def initialize(message, location)
@message = message
@location = location
end
Create a new warning object with the given message and location.
Instance Methods
lib/prism/parse_result.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/prism/parse_result.rb, line 347
def deconstruct_keys(keys)
{ message: message, location: location }
end
Implement the hash pattern matching interface for ParseWarning
.
#
lib/prism/parse_result.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/prism/parse_result.rb, line 352
def inspect
"#<Prism::ParseWarning @message=#{@message.inspect} @location=#{@location.inspect}>"
end
Returns a string representation of this warning.