diff --git a/processor/processor.go b/processor/processor.go index dc4120f..7a3a55d 100644 --- a/processor/processor.go +++ b/processor/processor.go @@ -326,6 +326,26 @@ function strsplit(inputstr, sep) return t end +---@param table table +---@param depth number? +function DumpTable(table, depth) + if depth == nil then + depth = 0 + end + if (depth > 200) then + print("Error: Depth > 200 in dumpTable()") + return + end + for k, v in pairs(table) do + if (type(v) == "table") then + print(string.rep(" ", depth) .. k .. ":") + DumpTable(v, depth + 1) + else + print(string.rep(" ", depth) .. k .. ": ", v) + end + end +end + -- String to number conversion helper function num(str) return tonumber(str) or 0