class KPeg::AndPredicate
Attributes
op[R]
Public Class Methods
new(op)
click to toggle source
Calls superclass method
KPeg::Operator::new
# File lib/kpeg/grammar.rb, line 329 def initialize(op) super() @op = op end
Public Instance Methods
==(obj)
click to toggle source
Calls superclass method
# File lib/kpeg/grammar.rb, line 344 def ==(obj) case obj when AndPredicate @op == obj.op else super end end
inspect()
click to toggle source
# File lib/kpeg/grammar.rb, line 353 def inspect inspect_type "andp", @op.inspect end
match(x)
click to toggle source
# File lib/kpeg/grammar.rb, line 336 def match(x) pos = x.pos m = @op.match(x) x.pos = pos return m ? MatchString.new(self, "") : nil end