Open
Description
At the moment, we generate the code by manipulating string directly, which is very verbose and hard to extend, sometimes is easy to generate buggy code, so I would suggest refactoring the codegen module, proposals includes:
-
rewriting the codegen module using some patterns, I found the the Visitor Pattern is the best choice here.
-
rewriting the codegen module using some other codegen library, such as kotlinpoet
This may need much work and this is just a proposal.