split ast generation and compilation