chiark / gitweb /
doc/concepts.tex: Typeset method rĂ´le names as identifiers.
[sod] / src / c-types-parse.lisp
index 6f5db4d86e4ce8a7ab214a52e19cc9ee275e42a4..3a5a53642e68e10064f037599d0e9625ee8ae2cb 100644 (file)
@@ -89,8 +89,7 @@   (default-slot (ds 'name slot-names)
 
 (defparameter *declspec-map*
   (let ((map (make-hash-table :test #'equal)))
-    (dolist (item '((type :void :char :int :float :double
-                         (:bool :compat "_Bool"))
+    (dolist (item '((type :char :int :float :double)
                    (complexity (:complex :compat "_Complex")
                                (:imaginary :compat "_Imaginary"))
                    ((type :taggedp t) :enum :struct :union)
@@ -258,9 +257,10 @@ (defun scan-simple-declspec
   ;; Turns out to be easier to do this by hand.
   (let ((ds (and (eq (token-type scanner) :id)
                 (let ((kw (token-value scanner)))
-                  (or (and (boundp '*module-type-map*)
+                  (or (gethash kw *declspec-map*)
+                      (and (boundp '*module-type-map*)
                            (gethash kw *module-type-map*))
-                      (gethash kw *declspec-map*))))))
+                      (find-simple-c-type kw))))))
     (cond ((or (not ds) (and predicate (not (funcall predicate ds))))
           (values (list indicator) nil nil))
          ((and (typep ds 'declspec) (ds-taggedp ds))
@@ -402,7 +402,7 @@ (defun parse-declarator (scanner base-type &key kernel abstractp keywordp)
               (disallow-keyword-functions (type)
                 (when (typep type 'c-keyword-function-type)
                   (error "Functions with keyword arguments are only ~
-                          allowed at top-level.")))
+                          allowed at top-level")))
 
               (star ()
                 ;; Prefix: `*' qualifiers