and method

Parser<T> and(
  1. Parser other
)

Consumes this and another parser, but only considers the result of this parser.

Implementation

Parser<T> and(Parser other) => then(other).change<T>((r) {
      return new ParseResult(
        r.trampoline,
        r.scanner,
        this,
        r.successful,
        r.errors,
        span: r.span,
        value: (r.value != null ? r.value[0] : r.value) as T,
      );
    });