2 ms·
Usually you would want to use a CST for this task as opposed to an AST to preserve white space. comments, and structure during the generation. There's not a ton
by duped 4y ago
Usually you would want to use a CST for this task as opposed to an AST to preserve white space. comments, and structure during the generation. There's not a ton of tools that are designed to handle that for polyglot tools, tree-sitter is one (but it's a parser generator and not a code generator).
I think it would be easier to write for one language rather than N at first.
- patrick91 4y agoyes, I'd go with one language first, but I wasn't sure if it's best to go with AST/CST or with a templating language first