标签:fun code func 变量 level lua log function logs
function printTableItem(k, v, level) for i = 1, level do io.write(" ") end io.write(tostring(k), " = ", tostring(v), "\n") if type(v) == "table" then if not tablePrinted[v] then tablePrinted[v] = true for k, v in pairs(v) do printTableItem(k, v, level + 1) end end end end printTableItem("_G", _G, 0)
标签:fun code func 变量 level lua log function logs
原文地址:http://www.cnblogs.com/wangzhisdu/p/7766145.html