seq2<R1, R2> function

  1. @useResult
Parser<(R1, R2)> seq2<R1, R2>(
  1. Parser<R1> parser1,
  2. Parser<R2> parser2
)

Creates a Parser that consumes the 2 parsers passed as argument in sequence and returns a Record with 2 positional parse results.

For example, the parser seq2(char('a'), char('b')) returns ('a', 'b') for the input 'ab'.

Implementation

@useResult
Parser<(R1, R2)> seq2<R1, R2>(
  Parser<R1> parser1,
  Parser<R2> parser2,
) =>
    SequenceParser2<R1, R2>(parser1, parser2);