Hi all,
I notice the cindex module is very outdated, so I decided to have a play last night and added a significant amount of the missing CursorKind statics as well as the start of exposing CXType. In my experimentation, I’ve noticed is that there appears to be many missing CXCursorKind enums in the clang-c/Index.h header. As an example, I declared a small function in a test file:
void f0(int a0, int a1) {
start_over:
f1();
}
There are 3 children of f0, kinds being CXCursor_ParmDecl, CXCursor_ParmDecl, CXCursor_UnexposedStatement. I assume the 3rd node is the function body. I don’t think the python code is doing anything wrong when visiting the children. I looked at MakeCSCursor(Stmt *S, …) in CXCursor.cpp (libclang) and noticed that the function is are largely un-implemented. I can walk down and find the CallExpr (f1();).
Is this an area I could do some work in? Having complete python bindings for the entire AST would be a great way to learn clang…
Cheers,
Stu
Stuart Carnie, CTO
manomio | in retro we trust!