adjustSeekIndex 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. 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.
@param i The target token index. @return The adjusted target token index.
Implementation
@override
int adjustSeekIndex(int i) {
return nextTokenOnChannel(i, channel);
}