diff options
Diffstat (limited to 'main/main.go')
-rw-r--r-- | main/main.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/main/main.go b/main/main.go index 2067920..55ed5b5 100644 --- a/main/main.go +++ b/main/main.go @@ -13,6 +13,7 @@ type ProgramState struct { in walk.JSONIn out walk.JSONOut program []Command + pc int } func main() { @@ -55,8 +56,9 @@ func main() { } state.value = walkItem.Value state.path = walkItem.Path - for _, cmd := range state.program { - cmd.exec(&state) + state.pc = 0 + for state.pc < len(state.program) { + state.program[state.pc].exec(&state) } if !quiet { pathValues, err := walk.Compound(state.path) |