Antlr4.Runtime.BufferedTokenStream.AdjustSeekIndex C# (CSharp) Method

AdjustSeekIndex() protected method

Allowed derived classes to modify the behavior of operations which change the current stream position by adjusting the target token index of a seek operation.
Allowed derived classes to modify the behavior of operations which change the current stream position by adjusting the target token index of a seek operation. The default implementation simply returns i . If an exception is thrown in this method, the current stream index should not be changed.

For example, CommonTokenStream overrides this method to ensure that the seek target is always an on-channel token.

protected AdjustSeekIndex ( int i ) : int
i int The target token index.
return int
        protected internal virtual int AdjustSeekIndex(int i)
        {
            return i;
        }