aboutsummaryrefslogtreecommitdiff
path: root/lua_obj.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua_obj.lua')
-rw-r--r--lua_obj.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/lua_obj.lua b/lua_obj.lua
index a0ff4db..1378643 100644
--- a/lua_obj.lua
+++ b/lua_obj.lua
@@ -126,10 +126,11 @@ do
end,
__tostring = function(self)
local buff = { }
- local _list_0 = self.bits
- for _index_0 = 1, #_list_0 do
- local b = _list_0[_index_0]
+ for i, b in ipairs(self.bits) do
buff[#buff + 1] = tostring(b)
+ if i < #self.bits and type(b) ~= 'string' and b.is_statement then
+ buff[#buff + 1] = "\n"
+ end
end
local ret = concat(buff, "")
assert(not ret:match(".*table: 0x.*"))