show arg detection failures

This commit is contained in:
sonoro1234
2018-10-04 16:27:49 +02:00
parent 9846ee640f
commit 9ae5a207f6

View File

@@ -469,8 +469,8 @@ local function func_parser()
argscsinpars = argscsinpars:gsub("<([%w_]+)>","_%1") --ImVector argscsinpars = argscsinpars:gsub("<([%w_]+)>","_%1") --ImVector
local argsArr = {} local argsArr = {}
local functype_re = "^%s*[%w%s%*]+%(%*[%w_]+%)%([^%(%)]*%)" local functype_re = "^%s*[%w%s%*]+%(%*[%w_]+%)%([^%(%)]*%)"
local functype_reex = "^(%s*[%w%s%*]+)%(%*([%w_]+)%)(%([^%(%)]*%))" local functype_reex = "^(%s*[%w%s%*]+)%(%*([%w_]+)%)(%([^%(%)]*%))"
local functype_arg_rest = "^(%s*[%w%s%*]+%(%*[%w_]+%)%([^%(%)]*%)),*(.*)" local functype_arg_rest = "^(%s*[%w%s%*]+%(%*[%w_]+%)%([^%(%)]*%)),*(.*)"
local rest = argscsinpars:sub(2,-2) --strip () local rest = argscsinpars:sub(2,-2) --strip ()
@@ -498,13 +498,16 @@ local function func_parser()
else else
type,name = arg:match("(.+)%s([^%s]+)") type,name = arg:match("(.+)%s([^%s]+)")
end end
--if not type or not name then print(funcname,type,name,argscsinpars,arg) end if not type or not name then
--float name[2] to float[2] name print("failure arg detection",funcname,type,name,argscsinpars,arg)
local siz = name:match("(%[%d*%])") --float name[2] to float[2] name
if siz then local siz = name:match("(%[%d*%])")
type = type..siz else
name = name:gsub("(%[%d*%])","") if siz then
end type = type..siz
name = name:gsub("(%[%d*%])","")
end
end
end end
table.insert(argsArr,{type=type,name=name,ret=retf,signature=sigf}) table.insert(argsArr,{type=type,name=name,ret=retf,signature=sigf})
if arg:match("&") and not arg:match("const") then if arg:match("&") and not arg:match("const") then