matches

abstract fun matches(context: ParsingContext, index: Int): ExpectationResult<T>

Check if this expectation matches the given context at the given index among the context's tokens list.

The index is guaranteed to be in the bounds of the context's tokens, unless the expectation signals that it can handle OOB tokens (i.e. it implements HandlesTokenDrought).