capturedToken method
Returns the raw text of the token currently being dispatched (from tokenBegin to tokenEnd), if it is still retained in memory. The result may be truncated when the token was split across multiple calls to write.
Intended for diagnostics only (e.g. unknown-sequence callbacks); only call this when a diagnostic callback is actually registered, since it does work proportional to the token length.
Implementation
String capturedToken() => _queue.recentConsumed(tokenEnd - tokenBegin);