(defstruct (runtime-attribute-list-reference (:conc-name ralr-)) (form nil))
This macro serves the same purpose as destructuring-bind but allows for a different syntax.
Macro ATTRIBUTE-BIND Evaluate BODY with the values in LIST bound according to ATTRIBUTE-SPEC.
(define-condition tag-related-error (error) ((tag :accessor tag :initarg :tag :initform nil)))
(define-condition unrecognized-attribute (tag-related-error) ((attribute :accessor attribute :initarg :attribute)) (:report (lambda (c s) (if (tag c) (format s "Unrecognized attribute ~S in ~S." (attribute c) (tag c)) (format s "Unrecognized attribute ~S." (attribute c))))))
(define-condition illegal-attribute-use (tag-related-error) ((attribute-type :accessor attribute-type :initarg :attribute-type)) (:report (lambda (c s) (format s "Attributes of type '~A' are not allowed ~A (hint: missing &allow-custom-attributes?)." (attribute-type c) (aif (tag c) (format nil "for tag ~A" it) "here")))))
Function PARSE-ATTRIBUTE-SPEC Parse an attribute spec into required args, attribute args, other args and the body arg.