elua: add support for ctor func as last param

This commit is contained in:
Daniel Kolesa 2014-10-07 15:06:32 +01:00
parent e71573d6ed
commit 48c79d39f8
1 changed files with 6 additions and 0 deletions

View File

@ -467,6 +467,11 @@ end
end
end
s:write(table.concat(parnames, ", "))
if #parnames == 0 then
s:write("__func")
else
s:write(", __func")
end
s:write(")\n")
-- write ctor body
local j = 1
@ -492,6 +497,7 @@ end
s:write(table.concat(fpars, ", "))
s:write(")\n")
end
s:write(" if __func then __func() end\n")
s:write(" end")
if #self.children > 0 then
s:write(",\n\n")