cpp2ffi and generator: allow parsing of header lines

This commit is contained in:
Victor Bombi
2020-09-24 16:21:11 +02:00
parent 3270e6b0f2
commit abe5b56fd6
2 changed files with 18 additions and 10 deletions

View File

@@ -360,7 +360,7 @@ local function parseImGuiHeader(header,names)
--prepare parser
local parser = cpp2ffi.Parser()
parser.separate_locations = function(self,cdefs)
parser.separate_locationsNO = function(self,cdefs)
local imguicdefs = {}
local othercdefs = {}
for i,cdef in ipairs(cdefs) do
@@ -399,7 +399,7 @@ local function parseImGuiHeader(header,names)
cpp2ffi.save_data("cdefs1.lua",table.concat(tableo,"\n"))
--]]
for line,loca,loca2 in iterator(pipe,names,{},COMPILER) do
parser:insert(line, loca)
parser:insert(line, tostring(loca)..":"..tostring(loca2))
--table.insert(tableo,line)
--print(loca,loca2)
end