TokenReader<TKind>.Peek Method
Definition
Returns the token at the specified offset from the current position, clamped to the ends of the reader, i.e. offsets before the first token return the first token and offsets after the last token return the last token.
public Token<TKind> Peek(int offset);
Parameters
| Name | Type | Description |
|---|---|---|
offset |
Int32 |
The offset from the current position; can be negative to peek at preceding tokens. |
Returns
The token at the offset.