Class: Predicator::Visitors::Instructions
- Defined in:
- lib/predicator/visitors/instructions.rb
Constant Summary
Constants inherited from Visitor
Instance Attribute Summary collapse
-
#instructions ⇒ Object
readonly
Returns the value of attribute instructions.
Instance Method Summary collapse
- #accept(ast) ⇒ Object
-
#initialize(instructions = []) ⇒ Instructions
constructor
A new instance of Instructions.
Constructor Details
#initialize(instructions = []) ⇒ Instructions
Returns a new instance of Instructions.
6 7 8 9 |
# File 'lib/predicator/visitors/instructions.rb', line 6 def initialize instructions=[] @instructions = instructions @label_locations = {} end |
Instance Attribute Details
#instructions ⇒ Object (readonly)
Returns the value of attribute instructions.
4 5 6 |
# File 'lib/predicator/visitors/instructions.rb', line 4 def instructions @instructions end |
Instance Method Details
#accept(ast) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/predicator/visitors/instructions.rb', line 11 def accept ast super update_jumps remove_labels @instructions end |