<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/subex/main.go
diff options
context:
space:
mode:
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