src/c-types-parse.lisp: Hoist up the `ds-FOO' methods for raw types.
[sod] / src / c-types-parse.lisp
index 58e3ced..4475c72 100644 (file)
     map)
   "Maps symbolic labels and textual names to `declspec' instances.")
 
+(defmethod ds-label ((ty c-type)) :c-type)
+(defmethod ds-name ((ty c-type)) (princ-to-string ty))
+(defmethod ds-kind ((ty c-type)) 'type)
+
 ;; A collection of declaration specifiers, and how to merge them together.
 
 (defclass declspecs ()
    collection isn't good, I must roll back to the previous version.  So I
    don't get to take advantage of a mutable structure.)"))
 
-(defmethod ds-label ((ty c-type)) :c-type)
-(defmethod ds-name ((ty c-type)) (princ-to-string ty))
-(defmethod ds-kind ((ty c-type)) 'type)
-
 (defparameter *good-declspecs*
   '(((:int) (:signed :unsigned) (:short :long :long-long) ())
     ((:char) (:signed :unsigned) () ())