seq4<R1, R2, R3, R4> function

  1. @useResult
Parser<(R1, R2, R3, R4)> seq4<R1, R2, R3, R4>(
  1. Parser<R1> parser1,
  2. Parser<R2> parser2,
  3. Parser<R3> parser3,
  4. Parser<R4> parser4,
)

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

For example, the parser seq4(char('a'), char('b'), char('c'), char('d')) returns ('a', 'b', 'c', 'd') for the input 'abcd'.

Implementation

@useResult
Parser<(R1, R2, R3, R4)> seq4<R1, R2, R3, R4>(
  Parser<R1> parser1,
  Parser<R2> parser2,
  Parser<R3> parser3,
  Parser<R4> parser4,
) =>
    SequenceParser4<R1, R2, R3, R4>(parser1, parser2, parser3, parser4);