class YARP::LexCompat::Token

When we produce tokens, we produce the same arrays that Ripper does. However, we add a couple of convenience methods onto them to make them a little easier to work with. We delegate all other methods to the array.

Public Instance Methods

event() click to toggle source
# File yarp/lex_compat.rb, line 190
def event
  self[1]
end
location() click to toggle source
# File yarp/lex_compat.rb, line 186
def location
  self[0]
end
state() click to toggle source
# File yarp/lex_compat.rb, line 198
def state
  self[3]
end
value() click to toggle source
# File yarp/lex_compat.rb, line 194
def value
  self[2]
end