diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2024-04-07 15:27:36 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2024-04-07 15:27:36 +0100 |
commit | 658900fcae610caace83a112ac0ee865108ebc92 (patch) | |
tree | 4d7b6bebe0d192abf62970ca4324ef1ff274e3c8 /main/main.go | |
parent | 81925b6ad5212512d27365b8224b76095191431f (diff) | |
download | stred-go-658900fcae610caace83a112ac0ee865108ebc92.tar |
Change output subex internals to allow structures
Also add substitute register syntactic sugar
Diffstat (limited to 'main/main.go')
-rw-r--r-- | main/main.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/main.go b/main/main.go index 3a864ad..3fb1cbf 100644 --- a/main/main.go +++ b/main/main.go @@ -10,6 +10,7 @@ import ( type ProgramState struct { value, xreg, yreg, zreg []walk.Value + start, prevStart, end, nextEnd bool in walk.StredReader out walk.StredWriter program []Command @@ -42,6 +43,10 @@ func run(config config) { break } state.value = []walk.Value{walkItem.Value} + state.start = walkItem.Start + state.prevStart = walkItem.PrevStart + state.end = walkItem.End + state.nextEnd = walkItem.NextEnd state.pc = 0 for state.pc < len(state.program) { state.program[state.pc].exec(&state) |