ensure printall, ~, and @ behave in lua 5.3.6

develop
myk002 2021-08-06 15:02:08 -07:00
parent 3ae4dbeb21
commit 4606d5742e
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 3 additions and 2 deletions

@ -163,6 +163,7 @@ COMMA = ","
PERIOD = "."
function printall(table)
if type(table) ~= 'table' then print(tostring(table)) return end
local ok,f,t,k = pcall(pairs,table)
if ok then
for k,v in f,t,k do
@ -534,11 +535,11 @@ function dfhack.interpreter(prompt,hfile,env)
end,
['~'] = function(data)
print(table.unpack(data,2,data.n))
printall(data[2])
if type(data[2]) == 'table' then printall(data[2]) end
end,
['@'] = function(data)
print(table.unpack(data,2,data.n))
printall_ipairs(data[2])
if type(data[2]) == 'table' then printall_ipairs(data[2]) end
end,
['^'] = function(data)
printall_recurse(data[2])