From 50a092e4b5cb82131c0c8f6f46c7d21a42198858 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 25 Apr 2018 16:04:46 -0700 Subject: Got nomsu codegen working again. --- lua_obj.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lua_obj.lua') diff --git a/lua_obj.lua b/lua_obj.lua index e766c34..4e7de9b 100644 --- a/lua_obj.lua +++ b/lua_obj.lua @@ -104,6 +104,7 @@ do local bits = self.bits for i = 1, n do local b = select(i, ...) + assert(b ~= self, "No recursion please.") bits[#bits + 1] = b if type(b) == 'string' then do @@ -129,6 +130,7 @@ do end self.current_indent = 0 for i, b in ipairs(bits) do + assert(b ~= self, "No recursion please.") if type(b) == 'string' then do local spaces = b:match("\n([ ]*)[^\n]*$") -- cgit v1.2.3