 
   parse: =>
     @editorView.off 'cursor:moved', @onCursorMoved
-    @destroyReferenceMarkers()
-    @destroyErrorMarkers()
+    @destroyReferences()
+    @destroyErrors()
     text = @editor.buffer.getText()
     if text isnt @cachedText
       @cachedText = text

    @cursorMovedTimeoutId = setTimeout @onCursorMovedAfter, 0

  onCursorMovedAfter: =>
    @destroyReferenceMarkers()
    @createReferenceMarkers @ripper.find @editor.getSelectedBufferRange().start


  ###


  onParseEnd: (errors) =>
    if errors?
      @createErrors errors
    @createReferences()
    @editorView.off 'cursor:moved', @onCursorMoved
    @editorView.on 'cursor:moved', @onCursorMoved

  destroyErrors: ->
    return unless @errorMarkers?
    for marker in @errorMarkers
      marker.destroy()
    delete @errorMarkers

  createErrors: (errors) =>
    @errorMarkers = for { location, range, message } in errors
      if location? #TODO deprecate verification of the location in v0.4
        range = locationDataToRange location
