RepParserBase<E> constructor

RepParserBase<E>(
  1. Parser<E> p,
  2. int min, [
  3. int? max
])

Implementation

RepParserBase(this.p, this.min, [int? max]) : max = max ?? maxValue {
  RangeError.checkValidRange(min, max, maxValue);
  if (max == 0) {
    throw ArgumentError.value(max, 'max', 'Must be greater than 0');
  }

  label = _quote(p) + (max == maxValue ? '{$min}' : '{$min, $max}');
  quote = false;
}