且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将节点添加到 Clang 的 AST

更新时间:2023-11-25 07:50:21

可以在这里找到答案http://clang-developer.42468.n3.nabble.com/Adding-nodes-to-Clang-s-AST-td4054800.html

然而,节点被添加到编译 AST - 例如,如果有人想向代码注入命名空间,他不能直接通过代码使用命名空间,因为词法分析器不知道.

However, the nodes are added to the compiled AST - for instance, in case one wants to inject a namespace to the code, he can't use the namespace directly via the code because the lexer don't know about it.