times method

Parser<List<T>> times(
  1. int count
)

Returns a parser that accepts the receiver exactly count times. The resulting parser returns a list of the parse results of the receiver.

For example, the parser letter().times(2) accepts two letters and returns a list of the two parsed letters.

Implementation

Parser<List<T>> times(int count) => repeat(count, count);