I need to build an AST using clang and the only tutorials that I found are vague and two years out of date. Could anybody point me to an example?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There are several tutorial available that demonstrate the use of the Preprocessor
class and how to build an AST:
- A CLang tutorial (a bit outdated but with a lot of explanation)
- A recent update of this tutorial along with code samples.