selectFarthestJoined function

Failure selectFarthestJoined(
  1. Failure first,
  2. Failure second
)

Reports the parser failure farthest down in the input string, joining error messages at the same position.

Implementation

Failure selectFarthestJoined(Failure first, Failure second) =>
    first.position > second.position
        ? first
        : first.position < second.position
            ? second
            : first.failure('${first.message} OR ${second.message}');