TemplateGenerators: TreeGenerator decoupled from Generator