Class: IV::Phonic::AST::ConditionalExpression

Inherits:
Expression show all
Defined in:
lib/iv/phonic/ast.rb

Instance Method Summary collapse

Methods inherited from Expression

as

Methods inherited from Node

#begin_position, #end_position, #program, #source

Constructor Details

#initialize(parent, expr) ⇒ ConditionalExpression

Returns a new instance of ConditionalExpression.



327
328
329
330
331
332
# File 'lib/iv/phonic/ast.rb', line 327

def initialize parent, expr
  super parent, expr
  @cond = Expression.as self, expr[:cond]
  @left = Expression.as self, expr[:left]
  @right = Expression.as self, expr[:right]
end