Class: Attentive::Token
- Inherits:
-
Object
show all
- Defined in:
- lib/attentive/token.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(pos = nil) ⇒ Token
Returns a new instance of Token.
5
6
7
|
# File 'lib/attentive/token.rb', line 5
def initialize(pos=nil)
@pos = pos
end
|
Instance Attribute Details
#pos ⇒ Object
Returns the value of attribute pos.
3
4
5
|
# File 'lib/attentive/token.rb', line 3
def pos
@pos
end
|
Instance Method Details
#==(other) ⇒ Object
9
10
11
|
# File 'lib/attentive/token.rb', line 9
def ==(other)
self.class == other.class
end
|
#ambiguous? ⇒ Boolean
13
14
15
|
# File 'lib/attentive/token.rb', line 13
def ambiguous?
false
end
|
#entity? ⇒ Boolean
17
18
19
|
# File 'lib/attentive/token.rb', line 17
def entity?
false
end
|
#matches?(cursor) ⇒ Boolean
29
30
31
|
# File 'lib/attentive/token.rb', line 29
def matches?(cursor)
self == cursor.peek
end
|
#skippable? ⇒ Boolean
25
26
27
|
# File 'lib/attentive/token.rb', line 25
def skippable?
false
end
|
#whitespace? ⇒ Boolean
21
22
23
|
# File 'lib/attentive/token.rb', line 21
def whitespace?
false
end
|