<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;color:#444444">Hello,</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:#444444"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:#444444">I am writing a tool using LibClang. Is there an efficient way to modify the abstract syntax tree? For instance, I need to transform an "if statement" to another kind of statement, and so on.</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:#444444">In other words, the feature that I am looking for is source-to-source transformation.</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:#444444">The only method that comes to mind, is manipulating the source code directly which does not seem like a neat and efficient thing to do.</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:#444444"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:#444444">Any advice on this matter would be appreciated.</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:#444444"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:#444444">Best regards,</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:#444444">Pardis</div></div>