<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'main/command.go')
-rw-r--r--main/command.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/command.go b/main/command.go
index ef48596..5a898e2 100644
--- a/main/command.go
+++ b/main/command.go
@@ -1,8 +1,8 @@
package main
import (
- "main/walk"
"main/subex"
+ "main/walk"
"fmt"
)
@@ -46,7 +46,7 @@ func (cmd AppendNextCommand) exec(state *ProgramState) {
if err != nil {
panic("Missing next value")
}
- state.value = walk.ConcatData(state.value, nextItem.Value)
+ state.value = append(state.value, nextItem.Value...)
state.path = nextItem.Path
state.pc++
}
@@ -72,12 +72,12 @@ func (cmd DeletePathCommand) String() string {
return "D"
}
-func runSubex(state subex.Transducer, in []walk.Atom) (out []walk.Atom, error bool) {
- atomsOut, error := subex.RunTransducer(state, in)
+func runSubex(state subex.Transducer, in walk.ValueList) (walk.ValueList, bool) {
+ out, error := subex.RunTransducer(state, in)
if error {
return nil, true
}
- return atomsOut, false
+ return out, false
}
type SubstituteValueCommand struct {
@@ -193,7 +193,7 @@ func (cmd SwapPathCommand) String() string {
type AppendPathCommand struct {}
func (cmd AppendPathCommand) exec(state *ProgramState) {
- state.path = walk.ConcatData(state.path, state.value)
+ state.path = append(state.path, state.value...)
state.pc++
}
func (cmd AppendPathCommand) String() string {