Another day.
[sod] / class-defs.lisp
index 279af8c..8640cf5 100644 (file)
 ;;; Classes.
 
 (defclass sod-class ()
-  ((name :initarg :name
-        :type string
-        :reader sod-class-name)
-   (location :initarg :location
-            :initform (file-location nil)
-            :type file-location
-            :reader file-location)
-   (nickname :initarg :nick
-            :type string
-            :reader sod-class-nickname)
-   (direct-superclasses :initarg :superclasses
-                       :type list
+  ((name :initarg :name :type string :reader sod-class-name)
+   (location :initarg :location :initform (file-location nil)
+            :type file-location :reader file-location)
+   (nickname :initarg :nick :type string :reader sod-class-nickname)
+   (direct-superclasses :initarg :superclasses :type list
                        :reader sod-class-direct-superclasses)
-   (chain-link :initarg :link
-              :type (or sod-class null)
+   (chain-link :initarg :link :type (or sod-class null)
               :reader sod-class-chain-link)
-   (metaclass :initarg :metaclass
-             :type sod-class
+   (metaclass :initarg :metaclass :type sod-class
              :reader sod-class-metaclass)
-   (slots :initarg :slots
-         :type list
-         :initform nil
-         :accessor sod-class-slots)
-   (instance-initializers :initarg :instance-initializers
+   (slots :initarg :slots :initform nil
+         :type list :accessor sod-class-slots)
+   (instance-initializers :initarg :instance-initializers :initform nil
                          :type list
-                         :initform nil
                          :accessor sod-class-instance-initializers)
-   (class-initializers :initarg :class-initializers
-                      :type list
-                      :initform nil
-                      :accessor sod-class-class-initializers)
-   (messages :initarg :messages
-            :type list
-            :initform nil
-            :accessor sod-class-messages)
-   (methods :initarg :methods
-           :type list
-           :initform nil
-           :accessor sod-class-methods)
+   (class-initializers :initarg :class-initializers :initform nil
+                      :type list :accessor sod-class-class-initializers)
+   (messages :initarg :messages :initform nil
+            :type list :accessor sod-class-messages)
+   (methods :initarg :methods :initform nil
+           :type list :accessor sod-class-methods)
 
    (class-precedence-list :type list :accessor sod-class-precedence-list)
 
@@ -79,8 +61,7 @@
    (effective-methods :type list :accessor sod-class-effective-methods)
    (vtables :type list :accessor sod-class-vtables)
 
-   (state :initform nil
-         :type (member nil :finalized broken)
+   (state :initform nil :type (member nil :finalized broken)
          :accessor sod-class-state))
   (:documentation
    "Classes describe the layout and behaviour of objects.
 ;;; Slots and initializers.
 
 (defclass sod-slot ()
-  ((name :initarg :name
-        :type string
-        :reader sod-slot-name)
-   (location :initarg :location
-            :initform (file-location nil)
-            :type file-location
-            :reader file-location)
-   (class :initarg :class
-         :type sod-class
-         :reader sod-slot-class)
-   (type :initarg :type
-        :type c-type
-        :reader sod-slot-type))
+  ((name :initarg :name :type string :reader sod-slot-name)
+   (location :initarg :location :initform (file-location nil)
+            :type file-location :reader file-location)
+   (class :initarg :class :type sod-class :reader sod-slot-class)
+   (type :initarg :type :type c-type :reader sod-slot-type))
   (:documentation
    "Slots are units of information storage in instances.
 
                           (sod-slot-name slot)))))
 
 (defclass sod-initializer ()
-  ((slot :initarg :slot
-        :type sod-slot
-        :reader sod-initializer-slot)
-   (location :initarg :location
-            :initform (file-location nil)
-            :type file-location
-            :reader file-location)
-   (class :initarg :class
-         :type sod-class
-         :reader sod-initializer-clas)
-   (value-kind :initarg :value-kind
-              :type keyword
+  ((slot :initarg :slot :type sod-slot :reader sod-initializer-slot)
+   (location :initarg :location :initform (file-location nil)
+            :type file-location :reader file-location)
+   (class :initarg :class :type sod-class :reader sod-initializer-clas)
+   (value-kind :initarg :value-kind :type keyword
               :reader sod-initializer-value-kind)
-   (value-form :initarg :value-form
-              :type c-fragment
+   (value-form :initarg :value-form :type c-fragment
               :reader sod-initializer-value-form))
   (:documentation
    "Provides an initial value for a slot.
 ;;; Messages and methods.
 
 (defclass sod-message ()
-  ((name :initarg :name
-        :type string
-        :reader sod-message-name)
-   (location :initarg :location
-            :initform (file-location nil)
-            :type file-location
-            :reader file-location)
-   (class :initarg :class
-         :type sod-class
-         :reader sod-message-class)
-   (type :initarg :type
-        :type c-function-type
-        :reader sod-message-type))
+  ((name :initarg :name :type string :reader sod-message-name)
+   (location :initarg :location :initform (file-location nil)
+            :type file-location :reader file-location)
+   (class :initarg :class :type sod-class :reader sod-message-class)
+   (type :initarg :type :type c-function-type :reader sod-message-type))
   (:documentation
    "Messages the means for stimulating an object to behave.
 
                           (sod-message-name message)))))
 
 (defclass sod-method ()
-  ((message :initarg :message
-           :type sod-message
-           :reader sod-method-message)
-   (location :initarg :location
-            :initform (file-location nil)
-            :type file-location
-            :reader file-location)
-   (class :initarg :class
-         :type sod-class
-         :reader sod-method-class)
-   (type :initarg :type
-        :type c-function-type
-        :reader sod-method-type)
-   (body :initarg :body
-        :type (or c-fragment null)
-        :reader sod-method-body))
+  ((message :initarg :message :type sod-message :reader sod-method-message)
+   (location :initarg :location :initform (file-location nil)
+            :type file-location :reader file-location)
+   (class :initarg :class :type sod-class :reader sod-method-class)
+   (type :initarg :type :type c-function-type :reader sod-method-type)
+   (body :initarg :body :type (or c-fragment null) :reader sod-method-body))
   (:documentation
    "(Direct) methods are units of behaviour.
 
 ;;; Classes as C types.
 
 (defclass c-class-type (simple-c-type)
-  ((class :initarg :class
-         :type (or null sod-class)
-         :accessor c-type-class))
+  ((class :initarg :class :type (or null sod-class) :accessor c-type-class))
   (:documentation
    "A SOD class, as a C type.