parseMany method

  1. @experimental
  2. @protected
Tuple1<List<E>>? parseMany(
  1. ParseState state
)

Implementation

@experimental
@protected
Tuple1<List<E>>? parseMany(ParseState state) {
  final r1 = parse(state);
  if (r1 == null) {
    return Tuple1(<E>[]);
  }

  final list = [r1.$0];
  while (true) {
    final r1 = parse(state);
    if (r1 == null) {
      return Tuple1(list);
    }

    list.add(r1.$0);
  }
}