transform the ast on a recursive walk