TokenReader<TKind>.SkipUntil Method
Definition
Advances the reader until the current token is one of the specified kinds, stopping at the last token if none is found. Always advances at least one token unless already positioned at the last, making it suitable for panic mode error recovery: skipped tokens can never cause an infinite loop, and the synchronisation token is left as Current for the parser to decide whether to consume.
public void SkipUntil(params ReadOnlySpan<TKind> kinds);
Parameters
| Name | Type | Description |
|---|---|---|
kinds |
ReadOnlySpan<TKind> |
The kinds of token to stop at. |