class Prism::ParseWarning
This represents a warning that was encountered during parsing.
Attributes
location
[R]
Location
A Location object representing the location of this warning in the source.
The message associated with this warning.
Public Class Methods
# File vendor/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/parse_result.rb, line 655 def initialize(type, message, location, level) @type = type @message = message @location = location @level = level end
Create a new warning object with the given message and location.
Public Instance Methods
# File vendor/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/parse_result.rb, line 663 def deconstruct_keys(keys) { type: type, message: message, location: location, level: level } end
Implement the hash pattern matching interface for ParseWarning.
Source
# File vendor/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/parse_result.rb, line 668 def inspect "#<Prism::ParseWarning @type=#{@type.inspect} @message=#{@message.inspect} @location=#{@location.inspect} @level=#{@level.inspect}>" end
Returns a string representation of this warning.