Add ast depth next symbol function