<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi, all.</div><div dir="ltr">I'm writing some tools to convert a C++ class to something else, and I want to add  some custom information to the AST.</div><div dir="ltr"><br></div><div>At first, I decided to add some comments to mark some classes, but I found that the AST does not contain comments.</div><div><br></div><div>Secondly, I want to customize an attribute, but I found that it needs to recompile the Clang, I didn't find a "plug-in" way.  Since my tools are designed for public usage, a customized compiler is not very considerable.</div><div><br></div><div>Currently I have to force the user to declare their class names and field names with some special rules, but this is not very acceptable to me.</div><div><br></div><div>So anyone knows if there's a better way to add some custom information to the AST?</div></div></div>