kul 0.1.2

Parser for a unique textual notation that can be used as both a data format and a markup language and that has powerful extensibility of both lexical syntax and semantics. Inspired by the little-known Curl programming language. Has no unsafe code and has no external dependencies. This is the full crate that builds on and re-exports the core crate and that uses the std library.
Documentation
use crate::{
    Parser, ParseIter, ParseIterItem, SourceStream, TextConcat,
    parser::{CharClassifier, DatumAllocator, OperatorBindings},
};


#[inline]
pub(crate) fn collect_up_to_first_err<'p, CC, DA, OB, S>
    (pi: ParseIter<'p, Parser<CC, DA, OB>, S>)
     -> Vec<ParseIterItem<DA, OB>>
    where CC: CharClassifier,
          DA: DatumAllocator,
          DA::TT: TextConcat<DA>,
          OB: OperatorBindings<DA>,
          Parser<CC, DA, OB>: 'p,
          S: SourceStream<DA>,
{
    let mut already_errored = false;
    pi.take_while(|r|
                  if already_errored {
                      false
                  } else {
                      if r.is_err() {
                          already_errored = true;
                      }
                      true
                  })
      .collect()
}