in lib/src/relative_span_scanner.dart [94:104]
Never error(String message, {Match? match, int? position, int? length}) {
validateErrorArgs(string, match, position, length);
if (match == null && position == null && length == null) match = lastMatch;
position ??= match == null ? this.position : match.start;
length ??= match == null ? 1 : match.end - match.start;
final span = _sourceFile.span(_startLocation.offset + position,
_startLocation.offset + position + length);
throw StringScannerException(message, span, string);
}