From 472cd810868227285c3d887eb0fc180d31fa182b Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 19 Dec 2013 09:28:12 -0500 Subject: [PATCH] Removed dumptable. --- 1pass.lua | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/1pass.lua b/1pass.lua index 0b7f105..2c9727c 100644 --- a/1pass.lua +++ b/1pass.lua @@ -1,50 +1,7 @@ JSON = (loadfile "JSON.lua")() -local function dumptable(tabname, tab, depth) - if depth == nil then -- first call, before any recursion? - depth = 1 - end - - if tabname ~= nil then - if tab == nil then - print(tabname .. " = nil") - return - else - print(tabname .. " = {") - end - end - - local depthstr = "" - for i=1,(depth*4) do - depthstr = depthstr .. " " - end - - if tab.DUMPTABLE_ITERATED then - print(depthstr .. "(...circular reference...)") - else - tab.DUMPTABLE_ITERATED = true - for k,v in pairs(tab) do - if type(v) == "table" then - print(depthstr .. tostring(k) .. " = {") - dumptable(nil, v, depth + 1) - print(depthstr .. "}") - else - if k ~= "DUMPTABLE_ITERATED" then - print(depthstr .. tostring(k) .. " = " .. tostring(v)) - end - end - end - tab.DUMPTABLE_ITERATED = nil - end - - if tabname ~= nil then - print("}") - end -end - local function load_json_str(str, desc) local retval = JSON:decode(str) - --dumptable("JSON " .. desc, retval) return retval end