I'm quite thankful that we don't have to worry about the syntactic position of comments, and the wise folks of CL, as you may know, made it so that saving comment text can be as easy as:
(defparameter *comments* nil)
(defun comment-saver (stream char)
(declare (ignore char))
(push
(list
*load-pathname*
(stream-file-position stream)
(with-output-to-string (str)
(loop :with c :while (char/= #\newline (setf c (read-char stream)))
:do (write-char c str))))
*comments*)
(values))
(set-macro-character #\; #'comment-saver)
With apologies for boring the non-Lisp infatuated.