class Prism::LexCompat::Result

A result class specialized for holding tokens produced by the lexer.

Attributes

value[R]

The list of tokens that were produced by the lexer.

Public Class Methods

new(value, comments, magic_comments, data_loc, errors, warnings, source) click to toggle source

Create a new lex compat result object with the given values.

Calls superclass method Prism::Result::new
# File 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

Public Instance Methods

deconstruct_keys(keys) click to toggle source

Implement the hash pattern matching interface for Result.

Calls superclass method Prism::Result#deconstruct_keys
# File prism/lex_compat.rb, line 25
def deconstruct_keys(keys)
  super.merge!(value: value)
end