fix(compiler) to support template directives

could be static.