diff --git a/pkg/shsh/.stack.go.swp b/pkg/shsh/.token.go.swp similarity index 81% rename from pkg/shsh/.stack.go.swp rename to pkg/shsh/.token.go.swp index 7bc9a93..a2b523f 100644 Binary files a/pkg/shsh/.stack.go.swp and b/pkg/shsh/.token.go.swp differ diff --git a/pkg/shsh/debug.go b/pkg/shsh/debug.go index 8cd5371..ad16f5e 100644 --- a/pkg/shsh/debug.go +++ b/pkg/shsh/debug.go @@ -1,7 +1,7 @@ package shsh import ( - "collections" + "strings" ) func FmtToken(arg *Token) string { @@ -39,17 +39,17 @@ func PrintSExpression(arg *Token) { lists.push(arg) loop: - // string builder? + var constructor strings.Builder i := lists.pop() if i == nil { goto done } for (iter := i; iter != nil; iter = i.next { - // add each string to string builder? + constructor.WriteString(FmtToken(iter)) } - // print stringbuilder? + print(constructor.String()) goto loop done: