Class
A result class specialized for holding tokens produced by the lexer.
Attributes
Read
The list of tokens that were produced by the lexer.
Class Methods
lib/prism/lex_compat.rb
View on GitHub
# File tmp/rubies/ruby-master/lib/prism/lex_compat.rb, line 19
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 compat result object with the given values.
Instance Methods
lib/prism/lex_compat.rb
View on GitHub
# File tmp/rubies/ruby-master/lib/prism/lex_compat.rb, line 25
def deconstruct_keys(keys)
super.merge!(value: value)
end
Implement the hash pattern matching interface for Result
.