Support transforming a passed-in AST.