chain<T> function

ListParser<T> chain<T>(
  1. Iterable<Parser<T>> parsers, {
  2. bool failFast = true,
  3. SyntaxErrorSeverity? severity,
})

Expects to parse a sequence of parsers.

If failFast is true (default), then the first failure to parse will abort the parse.

Implementation

ListParser<T> chain<T>(Iterable<Parser<T>> parsers,
    {bool failFast = true, SyntaxErrorSeverity? severity}) {
  return _Chain<T>(
      parsers, failFast != false, severity ?? SyntaxErrorSeverity.error);
}