mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-10 11:58:30 +01:00
cpp2ffi: parseFunction receives nested namespace name (ImNodes needs it)
This commit is contained in:
@@ -1164,6 +1164,15 @@ function M.Parser()
|
|||||||
end
|
end
|
||||||
return parnam
|
return parnam
|
||||||
end
|
end
|
||||||
|
local function get_parents_nameC(it)
|
||||||
|
local parnam = ""
|
||||||
|
while it.parent do
|
||||||
|
parnam = it.parent.name.."_"..parnam
|
||||||
|
it = it.parent
|
||||||
|
end
|
||||||
|
if parnam:sub(-1)=="_" then parnam = parnam:sub(1,-2) end
|
||||||
|
return parnam
|
||||||
|
end
|
||||||
function par:gen_structs_and_enums()
|
function par:gen_structs_and_enums()
|
||||||
local outtab = {}
|
local outtab = {}
|
||||||
local outtabpre = {}
|
local outtabpre = {}
|
||||||
@@ -1228,7 +1237,7 @@ function M.Parser()
|
|||||||
if it.parent.re_name == "struct_re" or it.parent.re_name == "typedef_st_re" then
|
if it.parent.re_name == "struct_re" or it.parent.re_name == "typedef_st_re" then
|
||||||
stname = it.parent.name
|
stname = it.parent.name
|
||||||
elseif it.parent.re_name == "namespace_re" then
|
elseif it.parent.re_name == "namespace_re" then
|
||||||
namespace = it.parent.name
|
namespace = get_parents_nameC(it) --it.parent.name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if it.item:match"^%s*template%s+<" then
|
if it.item:match"^%s*template%s+<" then
|
||||||
|
Reference in New Issue
Block a user