class Prism::LexResult
This is a result specific to the lex and lex_file methods.
Attributes
Public Class Methods
(Array[[ Token, Integer ]] value, Array[comment] comments, Array[MagicComment] magic_comments, Location? data_loc, Array[ParseError] errors, Array[ParseWarning] warnings, Source source) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/parse_result.rb, line 783 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.
Calls superclass method
Prism::Result::new
Public Instance Methods
# File vendor/bundle/ruby/4.0.0/gems/prism-1.9.0/lib/prism/parse_result.rb, line 789 def deconstruct_keys(keys) super.merge!(value: value) end
Implement the hash pattern matching interface for LexResult.
Calls superclass method
Prism::Result#deconstruct_keys