parse the ast and transform require calls