src/pset-{proto,impl}.lisp: Move `decode-property' methods to `impl'.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 27 Jul 2019 00:05:41 +0000 (01:05 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 3 Aug 2019 15:27:36 +0000 (16:27 +0100)
Most of these don't count as part of the protocol.

src/pset-impl.lisp
src/pset-proto.lisp
src/sod.asd.in

index f938ad3..8e1743f 100644 (file)
 (defmethod file-location ((prop property))
   (file-location (p-location prop)))
 
+;;; Input conversions.
+
+(defmethod decode-property ((raw symbol)) (values :symbol raw))
+(defmethod decode-property ((raw integer)) (values :int raw))
+(defmethod decode-property ((raw string)) (values :string raw))
+(defmethod decode-property ((raw character)) (values :char raw))
+(defmethod decode-property ((raw function)) (values :func raw))
+(defmethod decode-property ((raw c-type)) (values :type raw))
+
 ;;; Keywords.
 
 (defmethod coerce-property-value
index 764350a..5e02d9b 100644 (file)
 (export 'decode-property)
 (defgeneric decode-property (raw)
   (:documentation "Decode a RAW value into a TYPE, VALUE pair.")
-  (:method ((raw symbol)) (values :symbol raw))
-  (:method ((raw integer)) (values :int raw))
-  (:method ((raw string)) (values :string raw))
-  (:method ((raw character)) (values :char raw))
   (:method ((raw property)) (values (p-type raw) (p-value raw)))
-  (:method ((raw cons)) (values (car raw) (cdr raw)))
-  (:method ((raw function)) (values :func raw))
-  (:method ((raw c-type)) (values :type raw)))
+  (:method ((raw cons)) (values (car raw) (cdr raw))))
 
 (export 'make-property)
 (defun make-property (name raw-value &key type location seenp)
index e1a6f46..0755979 100644 (file)
 
    ;; Property set protocol.
    (:file "pset-proto" :depends-on ("package" "c-types-proto"))
-   (:file "pset-impl" :depends-on ("pset-proto"))
+   (:file "pset-impl" :depends-on ("pset-proto" "module-proto"))
    (:file "pset-parse" :depends-on ("pset-proto" "lexer-proto"))
 
    ;; Code generation protocol.