Convert to annotated AST