mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-11 12:18:30 +01:00
cpp2ffi: skip static variable from template detection also
This commit is contained in:
@@ -985,7 +985,8 @@ function M.Parser()
|
|||||||
return ""
|
return ""
|
||||||
end --here we avoid empty structs
|
end --here we avoid empty structs
|
||||||
for j,it in ipairs(itlist) do
|
for j,it in ipairs(itlist) do
|
||||||
if it.re_name == "vardef_re" or it.re_name == "functype_re" or it.re_name == "union_re" then
|
if (it.re_name == "vardef_re" or it.re_name == "functype_re" or it.re_name == "union_re") then
|
||||||
|
if not (it.re_name == "vardef_re" and it.item:match"static") then --skip static variables
|
||||||
local it2 = it.item --:gsub("<([%w_]+)>","_%1") --templates
|
local it2 = it.item --:gsub("<([%w_]+)>","_%1") --templates
|
||||||
--local ttype,template = it.item:match("([^%s,%(%)]+)%s*<(.+)>")
|
--local ttype,template = it.item:match("([^%s,%(%)]+)%s*<(.+)>")
|
||||||
local ttype,template = it.item:match"([^%s,%(%)]+)%s*<(.+)>"
|
local ttype,template = it.item:match"([^%s,%(%)]+)%s*<(.+)>"
|
||||||
@@ -1007,9 +1008,7 @@ function M.Parser()
|
|||||||
if it.re_name == "vardef_re" then
|
if it.re_name == "vardef_re" then
|
||||||
it2 = it2:gsub("%s*=.+;",";")
|
it2 = it2:gsub("%s*=.+;",";")
|
||||||
end
|
end
|
||||||
--skip static variables
|
table.insert(outtab,it2)
|
||||||
if not (it.re_name == "vardef_re" and it2:match"static") then
|
|
||||||
table.insert(outtab,it2)
|
|
||||||
end
|
end
|
||||||
elseif it.re_name == "struct_re" or it.re_name == "enum_re" then
|
elseif it.re_name == "struct_re" or it.re_name == "enum_re" then
|
||||||
--nop
|
--nop
|
||||||
|
Reference in New Issue
Block a user