Function chompUntil

  • Chomp until you see a certain string.

    Remarks

    Example

    Multi-line comments You could define Haskell-style multi-line comments like this:

      const comment: P.Parser<P.Unit> =
    P.symbol("{-")
    .skip(P.chompUntil("-}"))

    I recommend using multiComment for this particular scenario though. It can be trickier than it looks!

    Parameters

    • str: string

    Returns Simple.Parser<Symbol>