mirror of
https://github.com/cimgui/cimgui.git
synced 2026-02-25 10:54:57 +00:00
constants work 2
This commit is contained in:
@@ -2363,6 +2363,15 @@ function M.Parser()
|
||||
print(it.item)
|
||||
end
|
||||
end
|
||||
elseif it.re_name == "vardef_re" then
|
||||
local it2 = it.item:gsub("constexpr","static const")
|
||||
if it2:match"static const" then
|
||||
local name, assig = it2:match("static const %s*.+%s+([%w_]+)%s*=%s*([^;]*);")
|
||||
--print(it2,name,assig)
|
||||
if name and assig then
|
||||
self.constants[name] = assig
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif it.re_name == "enum_re" then
|
||||
enums_for_table(it, outtab, enumsordered)
|
||||
|
||||
Reference in New Issue
Block a user