Class: IV::Phonic::AST::BinaryOperation
- Inherits:
-
Expression
- Object
- Node
- Expression
- IV::Phonic::AST::BinaryOperation
- Defined in:
- lib/iv/phonic/ast.rb
Instance Method Summary collapse
-
#initialize(parent, expr) ⇒ BinaryOperation
constructor
A new instance of BinaryOperation.
Methods inherited from Expression
Methods inherited from Node
#begin_position, #end_position, #program, #source
Constructor Details
#initialize(parent, expr) ⇒ BinaryOperation
Returns a new instance of BinaryOperation.
318 319 320 321 322 323 |
# File 'lib/iv/phonic/ast.rb', line 318 def initialize parent, expr super parent, expr @op = expr[:op] @left = Expression.as self, expr[:left] @right = Expression.as self, expr[:right] end |