Allowing XenForo_Template_Compiler and XenForo_Template_Compiler_Admin to be extended would allow template code to be manipulated by add-ons.
To do this would require only a small modification to the code in compileAndInsertParsedTemplate and compileParsedAdminTemplate methods of...