BeforeStep can be passed as an option to Validate. It adds a callback to be invoked just before each instruction is executed.
(h ...func(*VM))
| 33 | // BeforeStep can be passed as an option to Validate. It adds a |
| 34 | // callback to be invoked just before each instruction is executed. |
| 35 | func BeforeStep(h ...func(*VM)) Option { |
| 36 | return Option{ |
| 37 | apply: func(vm *VM) { vm.beforeStep = append(vm.beforeStep, h...) }, |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | // AfterStep can be passed as an option to Validate. It adds a |
| 42 | // callback to be invoked after each instruction is executed. |
no outgoing calls