anchor.diff:              (format *error-output* "Evaluated to ~f"
                       (cffi:foreign-funcall-pointer ptr () :double)))))
         (get-next-token))))
  - 
  +
  +(define-condition kaleidoscope-error (error)
  +  ((message :initarg :message :reader message))
  +  (:report (lambda (condition stream)
  +             (write-string (message condition) stream))))
  +
   (defun main-loop ()
     (do () ((eql *current-token* 'tok-eof))
       (format *error-output* "~&ready> ")
  -    (case *current-token*
  -      (#\; (get-next-token))
  -      (tok-def (handle-definition))
  -      (tok-extern (handle-extern))
  -      (otherwise (handle-top-level-expression)))))
  +    (handler-case (case *current-token*
  +                    (#\; (get-next-token))
  +                    (tok-def (handle-definition))
  +                    (tok-extern (handle-extern))
  +                    (otherwise (handle-top-level-expression)))
  +      (kaleidoscope-error (e) (format *error-output* "error: ~a~%" e)))))
   
   ;;; "Library" functions that can be "extern'd" from user code.
   
  
positive.code:     (when v
        (if (eql *current-token* #\))
          (get-next-token)
          (error "expected ')'"))
        v)))
  
  (defun parse-if-expression ()
  
negative.code:    (operatorp :initform nil :initarg :operatorp :reader operatorp)
     (precedence :initform 0 :initarg :precedence :reader precedence))
    (:documentation
     "This class represents the “prototype” for a function, which captures its
      name, and its argument names (thus implicitly the number of arguments the
      function takes)."))
  
  