From 3ff223f2a297a7300fede33dbe69da63f08e0c84 Mon Sep 17 00:00:00 2001 From: elioat Date: Sun, 9 Jun 2024 20:54:53 -0400 Subject: * --- lua/chupacabra/repl.lua | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'lua/chupacabra/repl.lua') diff --git a/lua/chupacabra/repl.lua b/lua/chupacabra/repl.lua index 6abbf46..ba489e2 100644 --- a/lua/chupacabra/repl.lua +++ b/lua/chupacabra/repl.lua @@ -1,17 +1,6 @@ local chupacabra = require("chupacabra") -- not a great, but a passable repl -local function table_to_string(t) - local str = "[" - for i, v in ipairs(t) do - if i > 1 then - str = str .. " " - end - str = str .. tostring(v) - end - str = str .. "]" - return str -end local stack = {} @@ -24,7 +13,7 @@ local function scratch_out() for i, entry in ipairs(stack) do print(" input: " .. entry.input) if type(entry.output) == "table" then - print(" output: " .. table_to_string(entry.output)) + print(" output: " .. chupacabra.table_to_string(entry.output)) else print(" output: " .. tostring(entry.output)) end -- cgit 1.4.1-2-gfad0