range function

Implementation

CharacterClassExpression range(String ranges) {
  final parser = RangesParser();
  final result = parser.parse(ranges);
  if (!parser.ok) {
    throw FormatException('Invalid ranges expression', ranges);
  }

  return CharacterClassExpression(result!);
}