mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-10 11:58:30 +01:00
cpp2ffi: dont generate comments
This commit is contained in:
@@ -345,13 +345,20 @@ local function parseItems(txt,dumpit,loca,linenumdict)
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
--item,inercoms = clean_comments(item)
|
--item,inercoms = clean_comments(item)
|
||||||
|
local itemold = item
|
||||||
item = item:gsub("extern __attribute__%(%(dllexport%)%) ","")
|
item = item:gsub("extern __attribute__%(%(dllexport%)%) ","")
|
||||||
local comments = table.concat(outercomms,"\n") --..inercoms
|
local comments = table.concat(outercomms,"\n") --..inercoms
|
||||||
if comments=="" then comments=nil end
|
if comments=="" then comments=nil end
|
||||||
outercomms = {}
|
outercomms = {}
|
||||||
if linenumdict then
|
if linenumdict then
|
||||||
local itemfirstline = item:match("[^\n]+")
|
local itemfirstline = itemold:match("[^\n]+")
|
||||||
loca = linenumdict[itemfirstline]
|
loca = linenumdict[itemfirstline]
|
||||||
|
if not loca then
|
||||||
|
print(itemold)
|
||||||
|
error"no entry in linenumdict"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
error"no linenumdict"
|
||||||
end
|
end
|
||||||
table.insert(itemarr,{re_name=re_name,item=item,locat=loca})--,comments=comments})
|
table.insert(itemarr,{re_name=re_name,item=item,locat=loca})--,comments=comments})
|
||||||
items[re_name] = items[re_name] or {}
|
items[re_name] = items[re_name] or {}
|
||||||
|
@@ -10,10 +10,10 @@ local INTERNAL_GENERATION = script_args[2]:match("internal") and true or false
|
|||||||
local FREETYPE_GENERATION = script_args[2]:match("freetype") and true or false
|
local FREETYPE_GENERATION = script_args[2]:match("freetype") and true or false
|
||||||
local CPRE,CTEST
|
local CPRE,CTEST
|
||||||
if COMPILER == "gcc" or COMPILER == "clang" then
|
if COMPILER == "gcc" or COMPILER == "clang" then
|
||||||
CPRE = COMPILER..[[ -E -C -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ]]
|
CPRE = COMPILER..[[ -E -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ]]
|
||||||
CTEST = COMPILER.." --version"
|
CTEST = COMPILER.." --version"
|
||||||
elseif COMPILER == "cl" then
|
elseif COMPILER == "cl" then
|
||||||
CPRE = COMPILER..[[ /E /C /DIMGUI_DISABLE_OBSOLETE_FUNCTIONS /DIMGUI_API="" /DIMGUI_IMPL_API="" ]]
|
CPRE = COMPILER..[[ /E /DIMGUI_DISABLE_OBSOLETE_FUNCTIONS /DIMGUI_API="" /DIMGUI_IMPL_API="" ]]
|
||||||
CTEST = COMPILER
|
CTEST = COMPILER
|
||||||
else
|
else
|
||||||
print("Working without compiler ")
|
print("Working without compiler ")
|
||||||
@@ -494,7 +494,7 @@ if #implementations > 0 then
|
|||||||
pipe:close()
|
pipe:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
parser2.separate_locations = function(self, cdefs)
|
parser2.separate_locationsNO = function(self, cdefs)
|
||||||
local sepcdefs = {}
|
local sepcdefs = {}
|
||||||
for i,impl in ipairs(implementations) do
|
for i,impl in ipairs(implementations) do
|
||||||
sepcdefs[i] = {[[imgui_impl_]].. impl,{}}
|
sepcdefs[i] = {[[imgui_impl_]].. impl,{}}
|
||||||
|
Reference in New Issue
Block a user