Function sortAssertions

  • Sorts adjacent assertions such that lookbehinds are always to the right of lookaheads.

    This is operation may be necessary for other transformers to pick up on certain patterns.

    E.g. (?=a)(?!b)(?<!c)(?<=d) => (?<!c)(?<=d)(?=a)(?!b)

    Parameters

    Returns Transformer