<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/subex/main.go
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2023-03-05 10:00:28 +0000
committerCharlie Stanton <charlie@shtanton.xyz>2023-03-05 10:00:28 +0000
commit6f107b7a0ccfbcd3e2ec05d91c98877d9b2e0fc7 (patch)
tree3f2831b0dee324473962bb78f2f6b459dff048cb /subex/main.go
parentba20360431842bed56109a34e36416a3de5bf905 (diff)
downloadstred-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.go23
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