<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 7, 2011, at 9:39 AM, Andrey Tarasevich wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello!
<div><br></div><div>At the moment I'm doing some source-to-source manipulations with clang. I using the RewriteObjC.cpp as an example of such manipulations, but as far as I understand the AST is not produced for the preprocessor directives, like for instance - #define value 1</div>
<div>Is the manual parsing the only way to deal with preprocessor directives or there is a way to translate them into AST? </div></blockquote><div><br></div><div>You can implement your own PPCallbacks subclass to watch all of the preprocessor activity.</div><div><br></div><blockquote type="cite"><div>Also where I can get list of all DeclNodes for the C language? Are they mixed with Objective-C and C++ in DeclNodes.inc?</div>
</blockquote><br></div><div>Yes, they're mixed in DeclNodes.inc. The C-specific nodes are all defined in include/clang/AST/Decl.h</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- Doug</div><br></body></html>