Function takeUntilP

  • Make a Matcher that returns all (0 or more) sequential matches of the first parser while the second parser does not match (that is until the second parser matches).

    Use takeUntil if the stop condition is based on the parsed value.

    Implementation is based on takeWhile.

    Type Parameters

    • TToken

    • TOptions

    • TValue

    Parameters

    • pValue: Parser<TToken, TOptions, TValue>

      A parser that produces result values.

    • pTest: Parser<TToken, TOptions, unknown>

      A parser that serves as a stop condition.

    Returns Matcher<TToken, TOptions, TValue[]>

Generated using TypeDoc