<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/command.go2
-rw-r--r--walk/walk.go11
2 files changed, 1 insertions, 12 deletions
diff --git a/main/command.go b/main/command.go
index 55c7cca..0db545b 100644
--- a/main/command.go
+++ b/main/command.go
@@ -116,5 +116,5 @@ func (cmd SwapPathCommand) exec(state *ProgramState) {
type AppendPathCommand struct {}
func (cmd AppendPathCommand) exec(state *ProgramState) {
- state.path = append(state.path, state.value...)
+ state.path = walk.ConcatData(state.path, state.value)
} \ No newline at end of file
diff --git a/walk/walk.go b/walk/walk.go
index f9bac2a..493bc46 100644
--- a/walk/walk.go
+++ b/walk/walk.go
@@ -333,17 +333,6 @@ func (in *JSONIn) readString(out []Atom) []Atom {
}
func (in *JSONIn) Read() (WalkItem, error) {
- item, err := in.read()
- if err != nil {
- return item, err
- }
- return WalkItem {
- Value: item.Value,
- Path: append([]Atom{}, item.Path...),
- }, err
-}
-
-func (in *JSONIn) read() (WalkItem, error) {
restart:
// TODO: Escaping
// TODO: Don't allow trailing commas