diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2023-03-05 10:00:28 +0000 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-03-05 10:00:28 +0000 |
commit | 6f107b7a0ccfbcd3e2ec05d91c98877d9b2e0fc7 (patch) | |
tree | 3f2831b0dee324473962bb78f2f6b459dff048cb /subex/main.go | |
parent | ba20360431842bed56109a34e36416a3de5bf905 (diff) | |
download | stred-go-6f107b7a0ccfbcd3e2ec05d91c98877d9b2e0fc7.tar |
Renames TransducerOutput to OutputContent (and related types) and moves into main/subexstate.go
Diffstat (limited to 'subex/main.go')
-rw-r--r-- | subex/main.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/subex/main.go b/subex/main.go index fd0d356..0b87dc9 100644 --- a/subex/main.go +++ b/subex/main.go @@ -8,29 +8,6 @@ import ( "strings" ) -// A part of an insertion, either an Atom or a slot from which to load -// TODO rename this -type TransducerOutput interface { - // Given the current store, return the []Atom produced by the TransducerOutput - build(Store) []walk.Atom -} - -// A TransducerOutput which is just an Atom literal -type TransducerReplacementAtom struct { - atom walk.Atom -} -func (replacement TransducerReplacementAtom) build(store Store) []walk.Atom { - return []walk.Atom{replacement.atom} -} - -// A TransducerOutput which is a slot that is loaded from -type TransducerReplacementLoad struct { - slot rune -} -func (replacement TransducerReplacementLoad) build(store Store) []walk.Atom { - return store[replacement.slot] -} - // Where slots are stored type Store map[rune][]walk.Atom // Return a new store with all the data from this one |