starGreedy method
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
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 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);