pypdfium2-team / ctypesgen

Wrapper generator for Python ctypes
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Include statements parsing draft #9

Closed mara004 closed 5 months ago

mara004 commented 5 months ago

A fun side project showing how to parse out include statements in python. Might be useful in the future for --deepen-inclusion 1 (rather than --all-headers), or for a wrapper to write individual outputs per header.

However, there might be some more elegant pre-processor mechanism to handle these cases. See also this thread: https://stackoverflow.com/questions/5834778/how-to-tell-where-a-header-file-is-included-from

I'm opening and closing this PR just to record the idea and the code snippet, so it may be picked up later.

mara004 commented 5 months ago

Whoops, PRs don't like reopening with force-pushes. Latest state is at https://github.com/pypdfium2-team/ctypesgen/compare/pypdfium2...includes

may want to open a new PR and keep it open, or not force push