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 [1]. For some unknown reason [1] crashes here with the warning "Python quit unexpectedly while using libclang.dylib plug-in. (Running on an OS Lion).<br>
<br>On my C version I can get each node being printed, but what I wanted is what [1] 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. [2] Seems to suggest this doesnt even exist on libclang C. <br>
<br>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 welcomed too.<br><br>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.<br>
<br>[1] <a href="https://gist.github.com/2503232">https://gist.github.com/2503232</a><br>[2] <a href="http://eli.thegreenplace.net/2011/07/03/parsing-c-in-python-with-clang/">http://eli.thegreenplace.net/2011/07/03/parsing-c-in-python-with-clang/</a><br>
<br>Thank you.<br><br clear="all">Carlos Andrade<br><div><a href="http://carlosandrade.co" target="_blank">http://carlosandrade.co</a></div><br>