about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-06-09 19:15:14 -0400
committerelioat <elioat@tilde.institute>2024-06-09 19:15:14 -0400
commita73134a79471fefef76c0668a375b722f5cd5605 (patch)
tree2a156933e68574059779acfea127108601143666
parent214332fa4e7dce2b4a44884cd2f201bdbbc65eef (diff)
downloadtour-a73134a79471fefef76c0668a375b722f5cd5605.tar.gz
*
-rw-r--r--lua/chupacabra/scratch.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/lua/chupacabra/scratch.lua b/lua/chupacabra/scratch.lua
index 4172950..6025888 100644
--- a/lua/chupacabra/scratch.lua
+++ b/lua/chupacabra/scratch.lua
@@ -22,7 +22,11 @@ end
 local function print_stack()
     for i, entry in ipairs(stack) do
         print(i .. "  input: " .. entry.input)
-        print("  output: " .. table_to_string(entry.output))
+        if type(entry.output) == "table" then
+            print("  output: " .. table_to_string(entry.output))
+        else
+            print("  output: " .. tostring(entry.output))
+        end
     end
 end
 
@@ -31,4 +35,6 @@ scratch("[2 4 6] 2 @..")
 scratch("3 : + [1 1 1] [2 3 4] @+ @..")
 scratch("[2 4 6] 2 @..")
 scratch("1 2 3 4 5 6 7 @.. [1 2 3 0 5 6 7] @=")
+scratch("2 3 +")
+scratch("3 : + 6 =")
 print_stack()