Class: RLSL::Prism::IR::UnaryOp

Inherits:
Node
  • Object
show all
Defined in:
lib/rlsl/prism/ir/expressions.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#type

Instance Method Summary collapse

Methods inherited from Node

#accept, visits

Constructor Details

#initialize(operator, operand, type = nil) ⇒ UnaryOp

Returns a new instance of UnaryOp.



85
86
87
88
89
90
# File 'lib/rlsl/prism/ir/expressions.rb', line 85

def initialize(operator, operand, type = nil)
  super()
  @operator = operator
  @operand = operand
  @type = type
end

Instance Attribute Details

#operandObject (readonly)

Returns the value of attribute operand.



81
82
83
# File 'lib/rlsl/prism/ir/expressions.rb', line 81

def operand
  @operand
end

#operatorObject (readonly)

Returns the value of attribute operator.



81
82
83
# File 'lib/rlsl/prism/ir/expressions.rb', line 81

def operator
  @operator
end