I’m writing a C# application that reads in a source code file of language X, and populates a data structure with the classes, methods etc. that appear in the source file.
After that, using this data structure I just populated, I can call any of these three functions:
GenerateCS()
GenerateJava()
GenerateCPP()
Basically, it ports language X to either of those three languages.
My question is, how can I structure this such that I have one class GenerateCode which functions as a base class and the other generate functions derive from it?
I suppose the particular syntax details of each language would have to reside within the derived classes itself, but what stuff could I abstract to the superclass?
What about:
or