Class: RLSL::Prism::IR::Assignment

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

Instance Attribute Summary collapse

Attributes inherited from Node

#type

Instance Method Summary collapse

Methods inherited from Node

#accept, visits

Constructor Details

#initialize(target, value) ⇒ Assignment

Returns a new instance of Assignment.



37
38
39
40
41
42
# File 'lib/rlsl/prism/ir/control_flow.rb', line 37

def initialize(target, value)
  super()
  @target = target
  @value = value
  @type = value&.type
end

Instance Attribute Details

#targetObject (readonly)

Returns the value of attribute target.



33
34
35
# File 'lib/rlsl/prism/ir/control_flow.rb', line 33

def target
  @target
end

#valueObject (readonly)

Returns the value of attribute value.



33
34
35
# File 'lib/rlsl/prism/ir/control_flow.rb', line 33

def value
  @value
end