[cfe-dev] Introducing Python Bindings for LibTooling
Firat Kasmis via cfe-dev
cfe-dev at lists.llvm.org
Thu Apr 25 08:52:33 PDT 2019
Hi,
I am working on python bindings for LibTooling right now - see
https://github.com/firolino/python-clang-tooling. So, one can use pretty
things such as
recordDecl(hasDescendant(
ifStmt(hasTrueExpression(
expr(hasDescendant(
ifStmt()))))))
in python as well.
I am almost finished. Just a few things are left:
- Include all narrowing and traverse AST matchers
- Fix CMakeLists.txt for other python versions
- Transform clang AST matcher unit tests to python version and use it
- Provide pip packages
- Provide Rewriter
- Clean the code
Unfortunately, the resulting python module is already 190 MB big. Since
most of the matcher stuff are templates, I need to instantiate everything
in any possible combination to make them exposable to python. If you have
suggestions or improvements regarding the bindings, please let me know.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190425/9a979f98/attachment.html>
More information about the cfe-dev
mailing list