Class: IV::Phonic::AST::UnaryOperation

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) ⇒ UnaryOperation

Returns a new instance of UnaryOperation.



336
337
338
339
340
# File 'lib/iv/phonic/ast.rb', line 336

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