From 6f107b7a0ccfbcd3e2ec05d91c98877d9b2e0fc7 Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Sun, 5 Mar 2023 10:00:28 +0000 Subject: Renames TransducerOutput to OutputContent (and related types) and moves into main/subexstate.go --- subex/main.go | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'subex/main.go') 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 -- cgit v1.2.3