Most of these don't count as part of the protocol.
(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
(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)
;; 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.