Class: Braingasm::Parser::Loop
- Inherits:
-
Object
- Object
- Braingasm::Parser::Loop
- Defined in:
- lib/braingasm/parser.rb
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.
95 96 97 |
# File 'lib/braingasm/parser.rb', line 95 def start_index @start_index end |
#stop_index ⇒ Object
Returns the value of attribute stop_index.
95 96 97 |
# File 'lib/braingasm/parser.rb', line 95 def stop_index @stop_index end |
Instance Method Details
#call(machine) ⇒ Object
97 98 99 |
# File 'lib/braingasm/parser.rb', line 97 def call(machine) machine.inst_jump_if_zero(stop_index + 1) end |