That part I follow. For declarations <span class="gI"><span class="go">all Adrien</span></span> had todo was:<br><br>virtual void HandleTranslationUnit(ASTContext &context) {<br>            TranslationUnitDecl* tu_decl = context.getTranslationUnitDecl();<br>
            TraverseDecl(tu_decl);<br>}<br><br>I would need something like this, but I don't know what I can pull from the context that will be useful. Basically I don't know what the commented out line should look like.<br>
<br>virtual void HandleTranslationUnit(ASTContext &context) {<br>
            //Stmt *s = context????<br>            TraverseStmt(s);<br>
}<br><br><br><br><div class="gmail_quote">On Thu, Jun 9, 2011 at 2:16 PM, Joshua Cranmer <span dir="ltr"><<a href="mailto:Pidgeot18@gmail.com">Pidgeot18@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 6/9/2011 10:15 AM, ret val wrote:<br>
> Do you happen to know anything about the TraverseStmt() method from my<br>
> previous post any chance? Thats stopping me from digging in more.<br>
><br>
> (I see the equivalent TraverseStmt() method now, but I do not see a<br>
> way to get statements fron the ASTContext.)<br>
<br>
</div>What you need to do is start the traversing in the HandleTranslationUnit<br>
method. So long as you keep returning true in the methods you implement,<br>
you will visit every node. (Side note: there's no way to disable<br>
visiting particular subtrees, as far as I can see...)<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Joshua Cranmer<br>
News submodule owner<br>
DXR coauthor<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br>