cimgui_internal.h generation

This commit is contained in:
sonoro1234
2019-11-28 11:59:25 +01:00
parent 8096fb69fe
commit 4d7a7ac09f
6 changed files with 1677 additions and 4 deletions

View File

@@ -820,6 +820,8 @@ function M.Parser()
end
--clean mutable
it2 = it2:gsub("mutable","")
--clean namespaces
it2 = it2:gsub("%w+::","")
--skip static variables
if not (it.re_name == "vardef_re" and it2:match"static") then
table.insert(outtab,it2)
@@ -850,6 +852,20 @@ function M.Parser()
end
end
end
--get structs in namespace
for i,it in ipairs(itemsarr) do
if it.re_name == "namespace_re" then
local nsp = it.item:match("%b{}"):sub(2,-2)
local namespace = it.item:match("namespace%s+(%S+)")
local nspparr,itemsnsp = parseItems(nsp)
for insp,itnsp in ipairs(nspparr) do
if itnsp.re_name == "struct_re" then --or itnsp.re_name == "functionD_re" then
--print("in mamespace",itnsp.item,namespace)
table.insert(outtab,itnsp.item)
end
end
end
end
--then structs and enums
for i,it in ipairs(itemsarr) do
if it.re_name == "enum_re" then