starGreedy method

  1. @useResult
Parser<List<R>> starGreedy(
  1. Parser<void> limit
)

Returns a parser that parses the receiver zero or more times until it reaches a limit. This is a greedy non-blind implementation of the PossessiveRepeatingParserExtension.star operator. The limit is not consumed.

For example, the parser char('{') & any().starGreedy(char('}')) & char('}') consumes the complete input '{abc}def}' of '{abc}def}'.

See LazyRepeatingParserExtension.starLazy for the lazy, more efficient, and generally preferred variation of this combinator.

Implementation

@useResult
Parser<List<R>> starGreedy(Parser<void> limit) =>
    repeatGreedy(limit, 0, unbounded);