<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/subex/subexstate.go
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2023-04-25 09:26:34 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2023-04-25 09:26:34 +0100
commit9b26559c8273fd4de6aa6a740d6472a665446274 (patch)
treebeba05acff8ef35438ecd2fc8ee5f910ecdc9a5d /subex/subexstate.go
parentfa750707cd3dd44bcbf59d9271d389c92b293621 (diff)
downloadstred-go-9b26559c8273fd4de6aa6a740d6472a665446274.tar
Refines storing and loading to use ids generated when the subex is compiled instead of the runes
Diffstat (limited to 'subex/subexstate.go')
-rw-r--r--subex/subexstate.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/subex/subexstate.go b/subex/subexstate.go
index 56063c0..4655ef9 100644
--- a/subex/subexstate.go
+++ b/subex/subexstate.go
@@ -52,7 +52,7 @@ func (state SubexDiscardState) accepting(store Store, outputStack OutputStack) [
// Pop the top of the OutputStack which contains the stuff outputted since the start of the store
// This outputted data gets stored in a slot
type SubexStoreEndState struct {
- slot rune
+ slot int
next SubexState
}
func (state SubexStoreEndState) eat(store Store, outputStack OutputStack, char walk.Atom) []SubexBranch {
@@ -80,7 +80,7 @@ func (replacement OutputAtomLiteral) build(store Store) []walk.Atom {
// An OutputContent which is a slot that is loaded from
type OutputLoad struct {
- slot rune
+ slot int
}
func (replacement OutputLoad) build(store Store) []walk.Atom {
return store[replacement.slot]