Class: IV::Phonic::AST::ConditionalExpression
- Inherits:
-
Expression
- Object
- Node
- Expression
- IV::Phonic::AST::ConditionalExpression
- Defined in:
- lib/iv/phonic/ast.rb
Instance Method Summary collapse
-
#initialize(parent, expr) ⇒ ConditionalExpression
constructor
A new instance of ConditionalExpression.
Methods inherited from Expression
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 |