From 9b26559c8273fd4de6aa6a740d6472a665446274 Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Tue, 25 Apr 2023 09:26:34 +0100 Subject: Refines storing and loading to use ids generated when the subex is compiled instead of the runes --- subex/subexstate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'subex/subexstate.go') 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] -- cgit v1.2.3