operator & method

  1. @useResult
Parser<List> operator &(
  1. Parser other
)

Combines this parser and other into a sequence, equivalent to calling seq.

Combines the receiver and other into a sequential parser producing a List<dynamic>.

final parser = letter() & digit().map(int.parse) & letter();
parser.parse('a1b'); // Success: ['a', 1, 'b']

For type-safe alternatives, prefer then, seq2, or seq3.

Implementation

@useResult
Parser<List<dynamic>> operator &(Parser other) => seq(other);