Class: CFG::BinaryNode
Instance Attribute Summary collapse
-
#lhs ⇒ Object
readonly
Returns the value of attribute lhs.
-
#rhs ⇒ Object
readonly
Returns the value of attribute rhs.
Attributes inherited from ASTNode
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(kind, lhs, rhs) ⇒ BinaryNode
constructor
A new instance of BinaryNode.
- #to_s ⇒ Object
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
#lhs ⇒ Object (readonly)
Returns the value of attribute lhs.
784 785 786 |
# File 'lib/CFG/config.rb', line 784 def lhs @lhs end |
#rhs ⇒ Object (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_s ⇒ Object
793 794 795 |
# File 'lib/CFG/config.rb', line 793 def to_s "BinaryNode(#{@kind}, #{@lhs}, #{@rhs})" end |