     @navigator.conflict = this
     @resolution = null
 
+  # Public: Has this conflict been resolved in any way?
+  #
+  # Return [Boolean]
+  #
   isResolved: -> @resolution?
 
+  # Public: Attach an event handler to be notified when this conflict is resolved.
+  #
+  # callback [Function]
+  #
   onDidResolveConflict: (callback) ->
     @emitter.on 'resolve-conflict', callback
 
+  # Public: Specify which Side is to be kept. Note that either side may have been modified by the
+  # user prior to resolution. Notify any subscribers.
+  #
+  # side [Side] our changes or their changes.
+  #
   resolveAs: (side) ->
     @resolution = side
     @emitter.emit 'resolve-conflict'
 
+  # Public: Locate the position that the editor should scroll to in order to make this conflict
+  # visible.
+  #
+  # Return [Point] buffer coordinates
+  #
   scrollTarget: -> @ours.marker.getTailBufferPosition()
 
+  # Public: Audit all Marker instances owned by subobjects within this Conflict.
+  #
+  # Return [Array<Marker>]
+  #
   markers: ->
     _.flatten [@ours.markers(), @theirs.markers(), @navigator.markers()], true
 
+  # Public: Console-friendly identification of this conflict.
+  #
+  # Return [String] that distinguishes this conflict from others.
+  #
   toString: -> "[conflict: #{@ours} #{@theirs}]"
 
+  # Public: Parse any conflict markers in a TextEditor's buffer and return a Conflict that contains
+  # markers corresponding to each.
+  #
+  # state [MergeState] Repository-wide state of the merge.
+  # editor [TextEditor] The editor to search.
+  # return [Array<Conflict>] A (possibly empty) collection of parsed Conflicts.
+  #
   @all: (state, editor) ->
     results = []
     previous = null
-    marker = new Marker state, editor
+    marker = new ConflictParser(state, editor)
 
     editor.getBuffer().scan CONFLICT_REGEX, (m) ->
       marker.start m


        @position = INVALID
      else
        throw new Error "Unexpected position for side: #{@position}"

    bannerMarker = @editor.markBufferRange(
      [[bannerRowStart, 0], [bannerRowEnd, 0]], @options

MIDDLE = 'middle'
BOTTOM = 'bottom'

# Private: ConflictParser discovers git conflict markers in a corpus of text and constructs Conflict
# instances that mark the correct lines.
#
class ConflictParser

  # Common options used to construct markers.
  options =
    persistent: false
    invalidate: 'never'

  # Private: Initialize a parser to operate on a specific TextEditor.
  #
  # state [MergeState] - Repository-wide conflict resolution state.
  # editor [TextEditor] - An editor containing text that may include one or more conflicts.
  #
  constructor: (@state, @editor) ->
    @position = INVALID

  # Private: Begin handling the result of a CONFLICT_REGEX match.
  #
  # m [Array] - The match object returned from CONFLICT_REGEX.
  #
  start: (@m) ->
    @startRow = @m.range.start.row
    @endRow = @m.range.end.row
