Class: Bool::Or

Inherits:
Node
  • Object
show all
Defined in:
lib/bool/ast.rb,
ext/bool_ext/ext.c

Instance Attribute Summary collapse

Attributes inherited from Node

#token

Instance Method Summary collapse

Constructor Details

#initialize(token, left, right) ⇒ Or

Returns a new instance of Or.



43
44
45
46
# File 'lib/bool/ast.rb', line 43

def initialize(token, left, right)
  super(token)
  @left, @right = left, right
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



41
42
43
# File 'lib/bool/ast.rb', line 41

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



41
42
43
# File 'lib/bool/ast.rb', line 41

def right
  @right
end

Instance Method Details

#accept(visitor, arg) ⇒ Object



48
49
50
# File 'lib/bool/ast.rb', line 48

def accept(visitor, arg)
  visitor.visit_or(self, arg)
end