      :parser 'json-read)))
 
 (defun ycmd--col-line-to-position (col line)
+  "Convert COL and LINE into a position in the current buffer.
+
+COL and LINE are expected to be as returned from ycmd, e.g. from
+notify-file-ready.
+"
   (car (compute-motion (window-start)
                        '(0 . 0)
                        (point-max)


(defconst ycmd--file-ready-faces
  '(("ERROR" . (error (underline t) bold))
    ("WARNING" . (warning))))

(defun ycmd--decorate-single-parse-result (r)
  (destructuring-bind
      ((location_extent
        (end

                      end-line-num))
            (face (assoc-default kind ycmd--file-ready-faces)))
        (message "%s %s" start-pos end-pos)
	(set-text-properties
         start-pos end-pos `(font-lock-face ,face))))))

(defun ycmd--decorate-with-parse-results (results)
  "Decorates a buffer using the results of a file-ready parse
list."
  (with-silent-modifications
    (set-text-properties (point-min) (point-max) nil)
    (mapcar 'ycmd--decorate-single-parse-result results)
    results))

(defun ycmd-notify-file-ready-to-parse ()
  (when (ycmd--major-mode-to-file-types major-mode)
