struct StackMachine::Jump

Overview

Struct for Jump opcode

Defined in:

stackmachine/opcode.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(index : Int32 | Symbol) #

[View source]

Instance Method Detail

def call(& : Int32 | Symbol -> ) : Void #

Pass in a block to perform specified operation with the underlying index

Jump.new.call do | index |
  do_something_with index
end

[View source]