ExpectedParser<E> constructor

ExpectedParser<E>(
  1. Parser<E> p,
  2. String label
)

Implementation

ExpectedParser(this.p, String label)
    : _err = label.isNotEmpty
          ? ExpectedError(label)
          : throw ArgumentError.value(label, 'label', 'Must not be empty') {
  if (p.label.isEmpty) {
    p.label = label;
  }

  label = label;
}