then<R5> method

  1. @useResult
SequenceParser5<R1, R2, R3, R4, R5> then<R5>(
  1. Parser<R5> other
)

Returns a parser that consumes the receiver followed by other in sequence and returns a SequenceParser5 with the 5 positional parse results.

Flattens into a strictly typed Record with 5 elements, preserving static type information.

For example, the parser char('a').then(char('b')).then(char('c')).then(char('d')).then(char('e')) returns ('a', 'b', 'c', 'd', 'e') for the input 'abcde'.

Implementation

@useResult
SequenceParser5<R1, R2, R3, R4, R5> then<R5>(Parser<R5> other) =>
    SequenceParser5<R1, R2, R3, R4, R5>(
      parser1,
      parser2,
      parser3,
      parser4,
      other,
    );