Class: StarlarkCompiler::AST::BinaryOperator
- Defined in:
- lib/starlark_compiler/ast.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Node
Instance Attribute Summary collapse
-
#lhs ⇒ Object
readonly
Returns the value of attribute lhs.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
-
#rhs ⇒ Object
readonly
Returns the value of attribute rhs.
Instance Method Summary collapse
-
#initialize(lhs, rhs, operator:) ⇒ BinaryOperator
constructor
A new instance of BinaryOperator.
Constructor Details
#initialize(lhs, rhs, operator:) ⇒ BinaryOperator
Returns a new instance of BinaryOperator.
168 169 170 171 172 |
# File 'lib/starlark_compiler/ast.rb', line 168 def initialize(lhs, rhs, operator:) @lhs = node(lhs) @rhs = node(rhs) @operator = operator end |
Instance Attribute Details
#lhs ⇒ Object (readonly)
Returns the value of attribute lhs.
167 168 169 |
# File 'lib/starlark_compiler/ast.rb', line 167 def lhs @lhs end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
167 168 169 |
# File 'lib/starlark_compiler/ast.rb', line 167 def operator @operator end |
#rhs ⇒ Object (readonly)
Returns the value of attribute rhs.
167 168 169 |
# File 'lib/starlark_compiler/ast.rb', line 167 def rhs @rhs end |