Function getMatchingDirectionFromAssertionKind

  • Converts a given assertion kind into a matching direction.

    For lookaheads and lookbehinds, the returned matching direction will be the matching direction of their children. I.e. the result of lookahead is ltr and the result of lookbehind is rtl.

    For edge assertions (^ and $), the returned value is the direction of the character the edge assertion asserts. I.e. the result of ^ is rtl (because it asserts the previous character) and the result of $ is ltr (because it asserts the next character).

    Parameters

    • kind: "lookahead" | "lookbehind" | "end" | "start"

    Returns MatchingDirection