Closed ghost closed 5 years ago
CppHeaderParser doesn't handle macros. See:
Thanks for your info.
how about:
namespace ImGui
{
void Text(const char* fmt, ...) ;
} // namespace ImGui
can not process (const char* fmt, ...) too.
>>> h = CppHeaderParser.CppHeader(...)
>>> len(h.functions)
1
>>> h.functions[0]['namespace']
'ImGui::'
>>> h.functions[0]['name']
'Text'
>>> h.functions[0]['vararg']
True
>>> len(h.functions[0]['parameters'])
1
>>> h.functions[0]['parameters'][0]['name']
'fmt'
>>> h.functions[0]['parameters'][0]['type']
'const char *'
I don't see a problem here.
imgui.h
output
result
Text
: params' types = ['const char', ') IM_FMTARGS'], names = ['fmt', '(']TextV
: params' types = ['const char','va_list args ) IM_FMTLIST'], names = ['fmt', '(']I think :
Text
's params type should be ['conts char*', ''], name = ['fmt', '...']TextV
's params type should be ['const char *', 'va_list'], name = ['fmt', args]