Class: Logicality::Parser::Ast::BinaryOperatorNode
- Defined in:
- lib/logicality/parser/ast/binary_operator_node.rb
Overview
A binary operator contains two children (left and right) nodes.
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(left, token, right) ⇒ BinaryOperatorNode
constructor
A new instance of BinaryOperatorNode.
Methods inherited from Node
Constructor Details
#initialize(left, token, right) ⇒ BinaryOperatorNode
Returns a new instance of BinaryOperatorNode.
17 18 19 20 21 22 23 |
# File 'lib/logicality/parser/ast/binary_operator_node.rb', line 17 def initialize(left, token, right) super(token) @name = 'binary_operator_node' @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
15 16 17 |
# File 'lib/logicality/parser/ast/binary_operator_node.rb', line 15 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
15 16 17 |
# File 'lib/logicality/parser/ast/binary_operator_node.rb', line 15 def right @right end |