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).
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
isltr
and the result oflookbehind
isrtl
.For edge assertions (
^
and$
), the returned value is the direction of the character the edge assertion asserts. I.e. the result of^
isrtl
(because it asserts the previous character) and the result of$
isltr
(because it asserts the next character).