Porting over parse tree transformations