range function
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');