Function longest

  • Make a parser that tries all provided parsers at the same position and returns the longest successful match or a nonmatch if there was none.

    If there are multiple matches of the same maximum length then the first one of them is returned.

    Use choice to take the first match.

    Type Parameters

    • TToken

    • TOptions

    • TValue

    Parameters

    • Rest ...ps: Parser<TToken, TOptions, TValue>[]

      Parsers to try.

    Returns Parser<TToken, TOptions, TValue>

Generated using TypeDoc