range function

  1. @useResult
Parser<String> range(
  1. String start,
  2. String stop, [
  3. String? message
])

Returns a parser that accepts any character in the range between start and stop.

Implementation

@useResult
Parser<String> range(String start, String stop, [String? message]) =>
    SingleCharacterParser(
        RangeCharPredicate(toCharCode(start), toCharCode(stop)),
        message ??
            '[${toReadableString(start)}-${toReadableString(stop)}] expected');