expose compile AST

I believe it would be helpful to expose the compile AST function rather than it being a private function. One of our project requirements require the compile AST rather than compiling the template itself. Thanks.