Class: IV::Phonic::AST::ReturnStatement
- Defined in:
- lib/iv/phonic/ast.rb
Instance Method Summary collapse
-
#initialize(parent, stmt) ⇒ ReturnStatement
constructor
A new instance of ReturnStatement.
Methods inherited from Statement
Methods inherited from Node
#begin_position, #end_position, #program, #source
Constructor Details
#initialize(parent, stmt) ⇒ ReturnStatement
Returns a new instance of ReturnStatement.
216 217 218 219 220 221 222 223 |
# File 'lib/iv/phonic/ast.rb', line 216 def initialize parent, stmt super parent, stmt if stmt[:expr] @expr = Expression.as self, stmt[:expr] else @expr = nil end end |