From 8cf10efe3b5a1bcc70bc6e5590ee63fd5eb00c5b Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Wed, 19 Jul 2023 11:57:59 +0100 Subject: Huge refactor to a more value based system, doing away with terminals. Also introduces unit testing --- json_tokens/write.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'json_tokens/write.go') diff --git a/json_tokens/write.go b/json_tokens/write.go index 813f2f3..78ed186 100644 --- a/json_tokens/write.go +++ b/json_tokens/write.go @@ -29,7 +29,7 @@ func (out *JSONOut) indent(adjust int) { fmt.Fprint(out.writer, strings.Repeat("\t", len(out.structure) - 1 + adjust)) } -func (out *JSONOut) atomOut(key string, atom walk.Atom) { +func (out *JSONOut) atomOut(key string, atom walk.AtomOLD) { state := out.structure[len(out.structure) - 1] switch state { case JSONOutRoot, JSONOutMap, JSONOutArray: @@ -115,7 +115,7 @@ func (out *JSONOut) atomOut(key string, atom walk.Atom) { } } -func (out *JSONOut) Print(path walk.Path, values []walk.Atom) { +func (out *JSONOut) Print(path walk.Path, values []walk.AtomOLD) { var segment walk.PathSegment if len(path) > 0 { segment = path[len(path) - 1] -- cgit v1.2.3