quick and dirty attempt at printing eLua romtables (no tests)

eLua
kikito 11 years ago
parent b718a2e55c
commit 844c14f52c
  1. 4
      inspect.lua

@ -208,7 +208,7 @@ function inspect.inspect(rootObject, options)
local function putTable(t) local function putTable(t)
if alreadyVisited(t) then if alreadyVisited(t) then
puts('<table ', getId(t), '>') puts('<', type(t), ' ', getId(t), '>')
elseif level >= depth then elseif level >= depth then
puts('{...}') puts('{...}')
else else
@ -271,7 +271,7 @@ function inspect.inspect(rootObject, options)
puts(smartQuote(escape(v))) puts(smartQuote(escape(v)))
elseif tv == 'number' or tv == 'boolean' or tv == 'nil' then elseif tv == 'number' or tv == 'boolean' or tv == 'nil' then
puts(tostring(v)) puts(tostring(v))
elseif tv == 'table' then elseif tv == 'table' or tv == 'romtable' then
putTable(v) putTable(v)
else else
puts('<',tv,' ',getId(v),'>') puts('<',tv,' ',getId(v),'>')

Loading…
Cancel
Save