class DeadEnd::LexAll::LexValue

Value object for accessing lex values

This lex:

[1, 0], :on_ident, "describe", CMDARG

Would translate into:

lex.line # => 1
lex.type # => :on_indent
lex.token # => "describe"

Attributes

line[R]
state[R]
token[R]
type[R]

Public Class Methods

new(line, _, type, token, state) click to toggle source
# File lib/dead_end/lex_all.rb, line 52
def initialize(line, _, type, token, state)
  @line = line
  @type = type
  @token = token
  @state = state
end

Public Instance Methods

expr_label?() click to toggle source
# File lib/dead_end/lex_all.rb, line 59
def expr_label?
  state.allbits?(Ripper::EXPR_LABEL)
end