Class
This is a result specific to the ‘lex` and `lex_file` methods.
Attributes
Read
The list of tokens that were parsed from the source code.
Class Methods
lib/prism/parse_result.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/prism/parse_result.rb, line 615
def initialize(value, comments, magic_comments, data_loc, errors, warnings, source)
@value = value
super(comments, magic_comments, data_loc, errors, warnings, source)
end
Create a new lex result object with the given values.
Instance Methods
lib/prism/parse_result.rb
View on GitHub
# File tmp/rubies/ruby-3.4.0-preview1/lib/prism/parse_result.rb, line 621
def deconstruct_keys(keys)
super.merge!(value: value)
end
Implement the hash pattern matching interface for LexResult
.