Generate source code from AST with Antlr4 and StringTemplates
问题 If I have an AST and modify it, can I use StringTemplates to generate the source code for the modified AST? I have successfully implemented my grammar for Antlr4. It generates the AST of a source code and I use the Visitor Class to perform the desired actions. I then modify something in the AST and I would like to generate the source code for that modified AST. (I believe it is called pretty-printing?). Does Antlr's built in StringTemplates have all the functionality to do this? Where should