and method

  1. @useResult
Parser<R> and()

Returns a parser (logical and-predicate) that succeeds whenever the receiver does, but never consumes input.

For example, the parser char('_').and().seq(identifier) accepts identifiers that start with an underscore character. Since the predicate does not consume accepted input, the parser identifier is given the ability to process the complete identifier.

Implementation

@useResult
Parser<R> and() => AndParser<R>(this);