<- 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.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/subex/main.go b/subex/main.go
index e53a3c6..138de9a 100644
--- a/subex/main.go
+++ b/subex/main.go
@@ -66,7 +66,7 @@ type SubexBranch struct {
func (pair SubexBranch) eat(char walk.Datum) []SubexBranch {
states := pair.state.eat(pair.store, char)
for i := range states {
- states[i].output = append(pair.output, states[i].output...)
+ states[i].output = walk.ConcatData(pair.output, states[i].output)
}
return states
}
@@ -110,7 +110,7 @@ func RunTransducer(transducer SubexState, input <-chan walk.Datum) (output []wal
for _, state := range states {
outputEnds := state.accepting()
for _, outputEnd := range outputEnds {
- return append(state.output, outputEnd...), false
+ return walk.ConcatData(state.output, outputEnd), false
}
}
return nil, true