added support for template arguments in template ast construction