Class: Johnson::Nodes::BinaryNode

Inherits:
Node
  • Object
show all
Defined in:
lib/johnson/nodes/binary_node.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#column, #line, #value

Instance Method Summary collapse

Methods inherited from Node

#each, #to_dot, #to_ecma, #to_s, #to_sexp

Methods included from Visitable

#accept

Constructor Details

#initialize(line, column, left, right) ⇒ BinaryNode

Returns a new instance of BinaryNode.



58
59
60
61
# File 'lib/johnson/nodes/binary_node.rb', line 58

def initialize(line, column, left, right)
  super(line, column, right)
  @left = left
end

Instance Attribute Details

#leftObject

Returns the value of attribute left.



57
58
59
# File 'lib/johnson/nodes/binary_node.rb', line 57

def left
  @left
end