Class: YARP::LexCompat::Token
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- YARP::LexCompat::Token
show all
- Defined in:
- lib/yarp/lex_compat.rb
Overview
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.
Instance Method Summary
collapse
Instance Method Details
#event ⇒ Object
190
191
192
|
# File 'lib/yarp/lex_compat.rb', line 190
def event
self[1]
end
|
#location ⇒ Object
186
187
188
|
# File 'lib/yarp/lex_compat.rb', line 186
def location
self[0]
end
|
#state ⇒ Object
198
199
200
|
# File 'lib/yarp/lex_compat.rb', line 198
def state
self[3]
end
|
#value ⇒ Object
194
195
196
|
# File 'lib/yarp/lex_compat.rb', line 194
def value
self[2]
end
|