2009-10-18 12:19:19 UTC
To use templates is very good idea, I was already experimenting with it for C# generator, because it is very natural. I wanted to create some kind of templates for method definition, if statement, try/finally block ...etc. It seemed to be easy, but I noticed that substituting strings was not enough - the generator uses a lot of decisions to print out something or not. We shall think carefully whether to put this logic in the templates, or not. Also indendation is not trivial, templates shall contain meta chars to increase or decrease indendation. Anyway I'm really looking forward this step.