class Attentive::Token
Attributes
begin[RW]
Public Class Methods
new(pos=nil)
click to toggle source
# File lib/attentive/token.rb, line 5 def initialize(pos=nil) @begin = pos end
Public Instance Methods
==(other)
click to toggle source
# File lib/attentive/token.rb, line 13 def ==(other) self.class == other.class end
ambiguous?()
click to toggle source
# File lib/attentive/token.rb, line 17 def ambiguous? false end
end()
click to toggle source
# File lib/attentive/token.rb, line 9 def end self.begin + to_s.length end
entity?()
click to toggle source
# File lib/attentive/token.rb, line 21 def entity? false end
eof?()
click to toggle source
# File lib/attentive/token.rb, line 33 def eof? false end
inspect()
click to toggle source
# File lib/attentive/token.rb, line 46 def inspect "<#{self.class.name ? self.class.name.split("::").last : "Entity"} #{to_s.inspect}#{" #{self.begin}" if self.begin}>" end
matches?(cursor)
click to toggle source
# File lib/attentive/token.rb, line 37 def matches?(cursor) if self == cursor.peek cursor.pop return true end false end
skippable?()
click to toggle source
# File lib/attentive/token.rb, line 29 def skippable? false end
whitespace?()
click to toggle source
# File lib/attentive/token.rb, line 25 def whitespace? false end