Antlr4.Runtime.UnbufferedCharStream.La C# (CSharp) Method

La() public method

public La ( int i ) : int
i int
return int
        public virtual int La(int i)
        {
            if (i == -1)
            {
                return lastChar;
            }
            // special case
            Sync(i);
            int index = p + i - 1;
            if (index < 0)
            {
                throw new ArgumentOutOfRangeException();
            }
            if (index >= n)
            {
                return IntStreamConstants.Eof;
            }
            char c = data[index];
            if (c == unchecked((char)IntStreamConstants.Eof))
            {
                return IntStreamConstants.Eof;
            }
            return c;
        }