class Token
require 'benchmark'
require 'benchmark'
Attributes
kind[RW]
pos[RW]
val[RW]
Public Class Methods
new(tab)
click to toggle source
# File lib/lexer.rb, line 7 def initialize tab @kind,@val,@pos=*tab end
Public Instance Methods
accept(dummy,args=nil)
click to toggle source
# File lib/template_lexer.rb, line 27 def accept dummy,args=nil val end
is_a?(kind)
click to toggle source
# File lib/lexer.rb, line 11 def is_a? kind case kind when Symbol return @kind==kind when Array for sym in kind return true if @kind==sym end return false else raise "wrong type during lookahead" end end