build ast for pointer types