[cfe-dev] [libclang] Is there any method like get_children (python cindex) available for libclang or alternative to print the tree structure by the traversal method?
carlosviansi at gmail.com
Sun Jun 17 00:24:54 PDT 2012
I managed to create a transversal using libclang on C, map it to code and
get its types but now I am stuck trying to output it like a tree like it is
done at . For some unknown reason  crashes here with the warning
"Python quit unexpectedly while using libclang.dylib plug-in. (Running on
an OS Lion).
On my C version I can get each node being printed, but what I wanted is
what  does: Print the structure of the tree (who is child of who) and I
was trying to do so by tying to verify if the child is NULL but I cant find
any method available to do so.  Seems to suggest this doesnt even exist
on libclang C.
Is there any work around this? My solely goal is just to print the tree so
if there is a way to do so by not using the null child that would be
As a side note, I would appreciate if anyone would have come across any
solution to only print what is available on code on libclang and would be
gentle enough to provide the code or few suggestions of functions of
libclang that I could use to do so.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev