[PATCH] Reworked paragraph in FrontendAction tutorial
cib123 at googlemail.com
Tue Sep 10 03:43:45 PDT 2013
The paragraph explaining how each AST node class had its own overloaded hook in RecursiveASTVisitor didn't seem very clear to me. Reworked it in an attempt to be more explicit on what's actually happening.
@@ -60,10 +60,11 @@
Now that everything is hooked up, the next step is to implement a
RecursiveASTVisitor to extract the relevant information from the AST.
-The RecursiveASTVisitor provides hooks of the form bool
-VisitNodeType(NodeType \*) for most AST nodes; the exception are TypeLoc
-nodes, which are passed by-value. We only need to implement the methods
-for the relevant node types.
+If you wish to extract AST nodes of class *NodeType*, you would overload
+the function Visit\ *NodeType*\ (\ *NodeType* \*) in RecursiveASTVisitor;
+the exception are TypeLoc nodes, which are passed by-value, so for these
+you would overload Visit\ *NodeType*\ (\ *NodeType*). We only need
+to implement the methods for the relevant node types.
Let's start by writing a RecursiveASTVisitor that visits all
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 986 bytes
Desc: not available
More information about the cfe-commits