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

Fill() protected method

Add n characters to the buffer. Returns the number of characters actually added to the buffer. If the return value is less than n , then EOF was reached before n characters could be added.
protected Fill ( int n ) : int
n int
return int
        protected internal virtual int Fill(int n)
        {
            for (int i = 0; i < n; i++)
            {
                if (this.n > 0 && data[this.n - 1] == unchecked((char)IntStreamConstants.Eof))
                {
                    return i;
                }

                int c = NextChar();
                Add(c);
            }
            return n;
        }