Class: CFG::BinaryNode

Inherits:
ASTNode show all
Defined in:
lib/CFG/config.rb

Instance Attribute Summary collapse

Attributes inherited from ASTNode

#end, #kind, #start

Instance Method Summary collapse

Constructor Details

#initialize(kind, lhs, rhs) ⇒ BinaryNode

Returns a new instance of BinaryNode.



787
788
789
790
791
# File 'lib/CFG/config.rb', line 787

def initialize(kind, lhs, rhs)
  super(kind)
  @lhs = lhs
  @rhs = rhs
end

Instance Attribute Details

#lhsObject (readonly)

Returns the value of attribute lhs.



784
785
786
# File 'lib/CFG/config.rb', line 784

def lhs
  @lhs
end

#rhsObject (readonly)

Returns the value of attribute rhs.



785
786
787
# File 'lib/CFG/config.rb', line 785

def rhs
  @rhs
end

Instance Method Details

#==(other) ⇒ Object



797
798
799
# File 'lib/CFG/config.rb', line 797

def ==(other)
  @kind == other.kind && @lhs == other.lhs && @rhs == other.rhs
end

#to_sObject



793
794
795
# File 'lib/CFG/config.rb', line 793

def to_s
  "BinaryNode(#{@kind}, #{@lhs}, #{@rhs})"
end