starLazy method
Returns a parser that parses the receiver zero or more times until it
reaches a limit
. This is a lazy non-blind implementation of the star
operator. The limit
is not consumed.
For example, the parser char('{') & any().starLazy(char('}')) & char('}')
only consumes the part '{abc}'
of '{abc}def}'
.
See starGreedy for the greedy and less efficient variation of this combinator.
Implementation
@useResult
Parser<List<R>> starLazy(Parser<void> limit) =>
repeatLazy(limit, 0, unbounded);