Class: IV::Phonic::AST::WhileStatement

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

Instance Method Summary collapse

Methods inherited from Statement

as

Methods inherited from Node

#begin_position, #end_position, #program, #source

Constructor Details

#initialize(parent, stmt) ⇒ WhileStatement

Returns a new instance of WhileStatement.



155
156
157
158
159
# File 'lib/iv/phonic/ast.rb', line 155

def initialize parent, stmt
  super parent, stmt
  @cond = Expression.as self, stmt[:cond]
  @body = Statement.as self, stmt[:body]
end