Never error()

in lib/src/span_scanner.dart [107:116]


  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 ? 0 : match.end - match.start;

    final span = _sourceFile.span(position, position + length);
    throw StringScannerException(message, span, string);
  }