5 function dump(x
, indent1
, indent2
)
8 io
.write("> metatable: ")
9 dump(mt
, "", indent2
.. " ")
10 io
.write("> object: ")
14 if type(x
) == "string" then
16 elseif type(x
) == "number" then
18 elseif type(x
) == "table" then
20 for k
, v
in pairs(x
) do
21 dump(k
, indent2
.. " ", indent2
.. " ")
23 dump(v
, "", indent2
.. " ")
28 io
.write("<" .. type(x
) .. ">")
42 r
= Rect(2, 3, 100, 400)