plusGreedy method
Returns a parser that parses the receiver one or more times until it
reaches limit
. This is a greedy non-blind implementation of the
PossessiveRepeatingParserExtension.plus operator. The limit
is not
consumed.
For example, the parser char('{') & any().plusGreedy(char('}')) & char('}')
consumes the complete input '{abc}def}'
of '{abc}def}'
.
See LazyRepeatingParserExtension.plusLazy for the lazy, more efficient, and generally preferred variation of this combinator.
Implementation
@useResult
Parser<List<R>> plusGreedy(Parser<void> limit) =>
repeatGreedy(limit, 1, unbounded);