(with-parser-context (token-scanner-context :scanner scanner)
(parse (and "typename"
(skip-many ()
- (seq ((id :id))
- (if (gethash id *module-type-map*)
- (cerror* "Type `~A' already defined" id)
- (add-to-module *module*
- (make-instance 'type-item
- :name id))))
+ (error ()
+ (seq ((id :id))
+ (if (or (gethash id *module-type-map*)
+ (find-simple-c-type id))
+ (cerror* "Type `~A' already defined" id)
+ (add-to-module *module*
+ (make-instance 'type-item
+ :name id))))
+ (skip-until () #\, #\;))
#\,)
- #\;))))
+ (must #\;)))))
;;; Fragments.