mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-11 20:28:30 +01:00
add characters | < to defaults parsing
This commit is contained in:
@@ -466,7 +466,7 @@ local function parseFunction(self,stname,lineorig,namespace)
|
||||
defT.defaults = {}
|
||||
--for k,def in args:gmatch("([%w%s%*_]+)=([%w_%(%)%s,%*]+)[,%)]") do
|
||||
--for k,def in args:gmatch("([%w_]+)=([%w_%(%)%s,%*%.%-]+)[,%)]") do
|
||||
for k,def in args:gmatch('([%w_]+)=([%w_%(%)%s,%*%.%-%+%%"]+)[,%)]') do
|
||||
for k,def in args:gmatch('([%w_]+)=([|<%w_%(%)%s,%*%.%-%+%%"]+)[,%)]') do
|
||||
defT.defaults[k]=def
|
||||
end
|
||||
defT.templated = self.typenames[stname] and true
|
||||
|
@@ -536,11 +536,16 @@ if not pipe then
|
||||
error("could not execute gcc "..err)
|
||||
end
|
||||
|
||||
--local file,err = io.open("output_compiler.txt","w")
|
||||
--if not file then error(err) end
|
||||
|
||||
local iterator = (HAVE_COMPILER and cpp2ffi.location) or filelines
|
||||
|
||||
for line in iterator(pipe,{"imgui"},{}) do
|
||||
parser1:insert(line)
|
||||
--file:write(line)
|
||||
end
|
||||
--file:close()
|
||||
pipe:close()
|
||||
|
||||
parser1:do_parse()
|
||||
|
@@ -722,7 +722,7 @@
|
||||
"call_args": "(user_texture_id,a,b,uv_a,uv_b,col)",
|
||||
"cimguiname": "ImDrawList_AddImage",
|
||||
"defaults": {
|
||||
"col": "(((ImU32)(255",
|
||||
"col": "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))",
|
||||
"uv_a": "ImVec2(0,0)",
|
||||
"uv_b": "ImVec2(1,1)"
|
||||
},
|
||||
@@ -786,7 +786,7 @@
|
||||
"call_args": "(user_texture_id,a,b,c,d,uv_a,uv_b,uv_c,uv_d,col)",
|
||||
"cimguiname": "ImDrawList_AddImageQuad",
|
||||
"defaults": {
|
||||
"col": "(((ImU32)(255",
|
||||
"col": "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))",
|
||||
"uv_a": "ImVec2(0,0)",
|
||||
"uv_b": "ImVec2(1,0)",
|
||||
"uv_c": "ImVec2(1,1)",
|
||||
|
@@ -594,7 +594,7 @@ defs["ImDrawList_AddImage"][1]["argsoriginal"] = "(ImTextureID user_texture_id,c
|
||||
defs["ImDrawList_AddImage"][1]["call_args"] = "(user_texture_id,a,b,uv_a,uv_b,col)"
|
||||
defs["ImDrawList_AddImage"][1]["cimguiname"] = "ImDrawList_AddImage"
|
||||
defs["ImDrawList_AddImage"][1]["defaults"] = {}
|
||||
defs["ImDrawList_AddImage"][1]["defaults"]["col"] = "(((ImU32)(255"
|
||||
defs["ImDrawList_AddImage"][1]["defaults"]["col"] = "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))"
|
||||
defs["ImDrawList_AddImage"][1]["defaults"]["uv_a"] = "ImVec2(0,0)"
|
||||
defs["ImDrawList_AddImage"][1]["defaults"]["uv_b"] = "ImVec2(1,1)"
|
||||
defs["ImDrawList_AddImage"][1]["funcname"] = "AddImage"
|
||||
@@ -644,7 +644,7 @@ defs["ImDrawList_AddImageQuad"][1]["argsoriginal"] = "(ImTextureID user_texture_
|
||||
defs["ImDrawList_AddImageQuad"][1]["call_args"] = "(user_texture_id,a,b,c,d,uv_a,uv_b,uv_c,uv_d,col)"
|
||||
defs["ImDrawList_AddImageQuad"][1]["cimguiname"] = "ImDrawList_AddImageQuad"
|
||||
defs["ImDrawList_AddImageQuad"][1]["defaults"] = {}
|
||||
defs["ImDrawList_AddImageQuad"][1]["defaults"]["col"] = "(((ImU32)(255"
|
||||
defs["ImDrawList_AddImageQuad"][1]["defaults"]["col"] = "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))"
|
||||
defs["ImDrawList_AddImageQuad"][1]["defaults"]["uv_a"] = "ImVec2(0,0)"
|
||||
defs["ImDrawList_AddImageQuad"][1]["defaults"]["uv_b"] = "ImVec2(1,0)"
|
||||
defs["ImDrawList_AddImageQuad"][1]["defaults"]["uv_c"] = "ImVec2(1,1)"
|
||||
|
Reference in New Issue
Block a user