RepeatingParser<R> constructor

RepeatingParser<R>(
  1. Parser<R> parser,
  2. int min,
  3. int max
)

Implementation

RepeatingParser(Parser<R> parser, this.min, this.max) : super(parser) {
  if (min < 0) {
    throw ArgumentError(
        'Minimum repetitions must be positive, but got $min.');
  }
  if (max < min) {
    throw ArgumentError(
        'Maximum repetitions must be larger than $min, but got $max.');
  }
}