From b199b3f4bd5009d217377c96e36fc4455373629a Mon Sep 17 00:00:00 2001 From: Mauro Iazzi Date: Sun, 20 Apr 2008 14:57:49 +0200 Subject: [PATCH] added code to analyze functions --- new/generator.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/new/generator.lua b/new/generator.lua index 9ce1383..190f271 100644 --- a/new/generator.lua +++ b/new/generator.lua @@ -56,6 +56,7 @@ local types_desc = setmetatable({}, { return nil else t[k] = space + space.on_stack = 'userdata;' end return t[k] end, @@ -74,9 +75,20 @@ end do local t = {} --table.foreach(types_desc, function(i, j) t[j] = true end) - table.foreach(types_desc, print) + table.foreach(types_desc, function(n,d) print(n, d.label, d.on_stack) end) end - +bind_function = function(f) + if type(f)~='table' or string.find(f.label, 'Function')~=1 then + error('this is NOT a function') + end + io.write(f.xarg.type_name .. ' ' .. f.xarg.fullname .. + (f.xarg.static=='1' and ' [static]' or '').. + (f.xarg.virtual=='1' and ' [virtual]' or '').. + ' [in ' .. tostring(f.xarg.member_of) .. ']\n') +end +for _, v in pairs(xmlstream.byid) do + pcall(bind_function, v) +end -- 2.11.4.GIT