Skip to content
This repository has been archived by the owner on Nov 8, 2017. It is now read-only.

Refactor the Conflict parser. #229

Merged
merged 5 commits into from
Apr 25, 2016
Merged

Refactor the Conflict parser. #229

merged 5 commits into from
Apr 25, 2016

Conversation

smashwilson
Copy link
Owner

@smashwilson smashwilson commented Apr 22, 2016

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.

  • Implement the recursive call.
  • ES2015 it up.
  • Gracefully handle malformed patches.

@smashwilson smashwilson self-assigned this Apr 22, 2016
@smashwilson smashwilson changed the title [wip] Refactor the Conflict parser. Refactor the Conflict parser. Apr 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant