dearimgui / dear_bindings

C header (and language binding metadata) generator for Dear ImGui
MIT License
221 stars 12 forks source link

Unrecognized element when generating bindings for OpenGL3 backend #50

Closed shawnhatori closed 8 months ago

shawnhatori commented 8 months ago

Here's the output for python dear_bindings\dear_bindings.py --backend imgui\backends\imgui_impl_opengl3.h -o cimgui_impl_opengl3:

Dear Bindings: parse Dear ImGui headers, convert to C and output metadata.
Parsing [path]\imconfig.h
Parsing [path]\imgui_impl_opengl3.h
Unrecognised element LexToken(LOGICALAND,'&&',50,2831)
Unrecognised element LexToken(LOGICALAND,'&&',50,2831)
Storing unmodified DOM
Applying modifiers
Writing output to cimgui_impl_opengl3[.h/.cpp/.json]
Done
ShironekoBen commented 8 months ago

Oh, interesting - the preprocessor condition parser didn't cope with line continuations so it was failing to parse a #ifdef that split across two lines. I've fixed that and it seems to generate sensible output now. Thanks!

shawnhatori commented 8 months ago

Can confirm this error has been fixed, thanks!