I would like to know the possible approaches to translate a program in C++ to another language such as C using Clang. Should I walk in the AST and emit the code or should I create a new AST in the other language for example?.
I would like to know the possible approaches to translate a program in C++
to another language such as C using Clang. Should I walk in the AST and
emit the code or should I create a new AST in the other language for
example?.
The general advice I've seen given most often on this list is to walk the
AST and emit the code.