plusLazy method

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

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

For example, the parser char('{') & any().plusLazy(char('}')) & char('}') only consumes the part '{abc}' of '{abc}def}'.

See GreedyRepeatingParserExtension.plusGreedy for the greedy and less efficient variation of this combinator.

Implementation

@useResult
Parser<List<R>> plusLazy(Parser<void> limit) =>
    repeatLazy(limit, 1, unbounded);