Class: Crokus::Unary

Inherits:
Expr show all
Defined in:
lib/crokus/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ast

#accept, #str

Constructor Details

#initialize(op, rhs, postfix = nil) ⇒ Unary

Returns a new instance of Unary.



365
366
367
368
# File 'lib/crokus/ast.rb', line 365

def initialize op,rhs,postfix=nil
  @op,@rhs=op,rhs
  @postfix=postfix
end

Instance Attribute Details

#opObject

Returns the value of attribute op.



364
365
366
# File 'lib/crokus/ast.rb', line 364

def op
  @op
end

#postfixObject

Returns the value of attribute postfix.



364
365
366
# File 'lib/crokus/ast.rb', line 364

def postfix
  @postfix
end

#rhsObject

Returns the value of attribute rhs.



364
365
366
# File 'lib/crokus/ast.rb', line 364

def rhs
  @rhs
end