Class: Braingasm::Compiler::Loop
- Inherits:
-
Object
- Object
- Braingasm::Compiler::Loop
- Defined in:
- lib/braingasm/compiler.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#start_index ⇒ Object
Returns the value of attribute start_index.
-
#stop_index ⇒ Object
Returns the value of attribute stop_index.
Instance Method Summary collapse
Instance Attribute Details
#start_index ⇒ Object
Returns the value of attribute start_index.
179 180 181 |
# File 'lib/braingasm/compiler.rb', line 179 def start_index @start_index end |
#stop_index ⇒ Object
Returns the value of attribute stop_index.
179 180 181 |
# File 'lib/braingasm/compiler.rb', line 179 def stop_index @stop_index end |
Instance Method Details
#call(machine) ⇒ Object
181 182 183 |
# File 'lib/braingasm/compiler.rb', line 181 def call(machine) machine.inst_jump_if_data_zero(stop_index + 1) end |