tuple5<A, B, C, D, E> function

Parser<Tuple5<A, B, C, D, E>> tuple5<A, B, C, D, E>(
  1. Parser<A> a,
  2. Parser<B> b,
  3. Parser<C> c,
  4. Parser<D> d,
  5. Parser<E> e
)

A typed parser that parses a sequence of 5 values of different types.

Implementation

Parser<Tuple5<A, B, C, D, E>> tuple5<A, B, C, D, E>(
    Parser<A> a, Parser<B> b, Parser<C> c, Parser<D> d, Parser<E> e) {
  return chain([a, b, c, d, e]).map((r) {
    return Tuple5(r.value[0] as A, r.value[1] as B, r.value[2] as C,
        r.value[3] as D, r.value[4] as E);
  });
}