Class: RLSL::Prism::IR::WhileLoop

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(condition, body) ⇒ WhileLoop

Returns a new instance of WhileLoop.



65
66
67
68
69
70
# File 'lib/rlsl/prism/ir/control_flow.rb', line 65

def initialize(condition, body)
  super()
  @condition = condition
  @body = body
  @type = nil
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



61
62
63
# File 'lib/rlsl/prism/ir/control_flow.rb', line 61

def body
  @body
end

#conditionObject (readonly)

Returns the value of attribute condition.



61
62
63
# File 'lib/rlsl/prism/ir/control_flow.rb', line 61

def condition
  @condition
end