Class: RLSL::Prism::IR::ForLoop

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(variable, range_start, range_end, body) ⇒ ForLoop

Returns a new instance of ForLoop.



50
51
52
53
54
55
56
57
# File 'lib/rlsl/prism/ir/control_flow.rb', line 50

def initialize(variable, range_start, range_end, body)
  super()
  @variable = variable
  @range_start = range_start
  @range_end = range_end
  @body = body
  @type = nil
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



46
47
48
# File 'lib/rlsl/prism/ir/control_flow.rb', line 46

def body
  @body
end

#range_endObject (readonly)

Returns the value of attribute range_end.



46
47
48
# File 'lib/rlsl/prism/ir/control_flow.rb', line 46

def range_end
  @range_end
end

#range_startObject (readonly)

Returns the value of attribute range_start.



46
47
48
# File 'lib/rlsl/prism/ir/control_flow.rb', line 46

def range_start
  @range_start
end

#variableObject (readonly)

Returns the value of attribute variable.



46
47
48
# File 'lib/rlsl/prism/ir/control_flow.rb', line 46

def variable
  @variable
end