<div dir="ltr"><div>Hi Juan,</div><div><br></div>The easiest way to get the actual text is to simply get the tokens belonging to the respective cursors (e.g. ''.join(cursor.get_tokens())). I think this should get you what you want.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-29 19:28 GMT+02:00 Juan Jose Lopez Villarejo <span dir="ltr"><<a href="mailto:jj.lopezvillarejo@cern.ch" target="_blank">jj.lopezvillarejo@cern.ch</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto" style="word-wrap:break-word">
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hello,
<div><br>
</div>
<div>I’m using libclang for a visual documentation tool for C++ codes, Flowgen, under current development.<br>
<br>
I'd like Flowgen to access automatically the condition of an if-statement. Example:<br>
<br>
if ( varMax == 4 && <br>
varOther ==2 ) {<br>
std::cout << "test";<br>
} else if{<br>
std::cout << "test1";<br>
} else {<br>
std::cout << "test2"; <br>
}<br>
<br>
Imagine that I have accessed the if-statement node/Cursor with libclang<br>
#clang node types (CursorKind)<br>
#205: if statement<br>
<br>
I'd like to have (direct) access to the string "varMax == 4 && varOther ==2".<br>
I'd like to have (direct) access as well to the else-if node and the else node.<br>
Anyone knows how? Thank you and best regards,<br>
<br>
Juan J. Lopez-Villarejo<br>
<br>
</div>
</div>
</div>
</blockquote></div><br></div>