add template_type for ImVector templates in structs_and_enums

This commit is contained in:
sonoro1234
2018-10-14 17:47:38 +02:00
parent 51f02dca4d
commit 804acdcecd
3 changed files with 66 additions and 45 deletions

View File

@@ -923,8 +923,10 @@ local function gen_structs_and_enums_table(cdefs)
end
--split type name1,name2; in several lines
local typen,rest = line:match("([^,]+)%s(%S+[,;])")
local template_type = typen:match("/%*<(.+)>%*/")
if template_type then typen = typen:match("(.+)/%*") end
for name in rest:gmatch("([^%s,;]+)%s?[,;]") do
table.insert(outtab.structs[structnames[#structnames]],{type=typen,name=name})
table.insert(outtab.structs[structnames[#structnames]],{type=typen,template_type=template_type,name=name})
end
end
end