mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-10 11:58:30 +01:00
cpp2ffi: dont keep empty comments
This commit is contained in:
@@ -114,7 +114,7 @@ local function strsplit(str, pat)
|
||||
return t,t2
|
||||
end
|
||||
local function split_comment(line)
|
||||
local comment = line:match("(%s*//.*)") or ""
|
||||
local comment = line:match("(%s*//.*)") --or ""
|
||||
line = line:gsub("%s*//.*","")
|
||||
line = line:gsub("%s*$","")
|
||||
return line,comment
|
||||
@@ -1036,11 +1036,11 @@ function M.Parser()
|
||||
--table.insert(outtab,stru:match("(.-)%b{}"))
|
||||
table.insert(outtab,"\nstruct "..stname.."\n")
|
||||
table.insert(outtab,"{")
|
||||
table.insert(commtab,"")
|
||||
table.insert(commtab,"")
|
||||
table.insert(commtab,nil)--"")
|
||||
table.insert(commtab,nil)--"")
|
||||
if derived then
|
||||
table.insert(outtab,"\n "..derived.." _"..derived..";")
|
||||
table.insert(commtab,"")
|
||||
table.insert(commtab,nil)--"")
|
||||
end
|
||||
--local itlist,itemsin = parseItems(iner, false,locat)
|
||||
local itlist = itst.childs
|
||||
@@ -1075,7 +1075,7 @@ function M.Parser()
|
||||
it2 = it2:gsub("%s*=.+;",";")
|
||||
end
|
||||
table.insert(outtab,it2)
|
||||
table.insert(commtab,it.comments or "")
|
||||
table.insert(commtab,it.comments )--or "")
|
||||
end
|
||||
elseif it.re_name == "struct_re" or it.re_name == "enum_re" then
|
||||
--nop
|
||||
|
Reference in New Issue
Block a user