The ConflictParser has outgrown its initial implementation. Because diff3-style conflicts can recursively contain sub-merge conflicts, matching with a single regular expression and advancing through its match groups won't be enough: we need something that can recurse with it.
What I'm attempting instead is to use a simpler regexp to scan for lines that look like the beginning of a conflict, then invoking a stateful parser that advances row-by-row and descends into a recursive call if the BASE side looks like a conflict itself.
The
ConflictParser
has outgrown its initial implementation. Because diff3-style conflicts can recursively contain sub-merge conflicts, matching with a single regular expression and advancing through its match groups won't be enough: we need something that can recurse with it.What I'm attempting instead is to use a simpler regexp to scan for lines that look like the beginning of a conflict, then invoking a stateful parser that advances row-by-row and descends into a recursive call if the
BASE
side looks like a conflict itself.