Class: Pegarus::BinaryOp

Inherits:
Pattern show all
Defined in:
lib/pegarus/ast/pattern.rb

Direct Known Subclasses

Choice, Concatenation, Difference, Product

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Pattern

#*, #+, #+@, #-, #-@, #/, engine, #graph, #match, select_engine, #visit

Constructor Details

#initialize(first, second) ⇒ BinaryOp

Returns a new instance of BinaryOp.



122
123
124
125
# File 'lib/pegarus/ast/pattern.rb', line 122

def initialize(first, second)
  @first = Pegarus.pattern first
  @second = Pegarus.pattern second
end

Instance Attribute Details

#firstObject

Returns the value of attribute first.



120
121
122
# File 'lib/pegarus/ast/pattern.rb', line 120

def first
  @first
end

#secondObject

Returns the value of attribute second.



120
121
122
# File 'lib/pegarus/ast/pattern.rb', line 120

def second
  @second
end