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.



361
362
363
364
# File 'lib/crokus/ast.rb', line 361

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

Instance Attribute Details

#opObject

Returns the value of attribute op.



360
361
362
# File 'lib/crokus/ast.rb', line 360

def op
  @op
end

#postfixObject

Returns the value of attribute postfix.



360
361
362
# File 'lib/crokus/ast.rb', line 360

def postfix
  @postfix
end

#rhsObject

Returns the value of attribute rhs.



360
361
362
# File 'lib/crokus/ast.rb', line 360

def rhs
  @rhs
end