src/method-proto.lisp: Fix boneheaded `:keyword' as a type.
[sod] / src / frontend.lisp
index d394eee..68c8a96 100644 (file)
@@ -7,7 +7,7 @@
 
 ;;;----- Licensing notice ---------------------------------------------------
 ;;;
-;;; This file is part of the Sensble Object Design, an object system for C.
+;;; This file is part of the Sensible Object Design, an object system for C.
 ;;;
 ;;; SOD is free software; you can redistribute it and/or modify
 ;;; it under the terms of the GNU General Public License as published by
 
 (cl:defpackage #:sod-frontend
   (:use #:common-lisp #:optparse #:sod #:sod-parser)
-  (:shadowing-import-from #:optparse "INT"))
+  (:shadowing-import-from #:optparse #:int))
 
 (cl:in-package #:sod-frontend)
 
 ;;;--------------------------------------------------------------------------
+;;; Preparation for dumping.
+
+(clear-the-decks)
+(exercise)
+
+;;;--------------------------------------------------------------------------
 ;;; The main program.
 
 (eval-when (:compile-toplevel :load-toplevel :execute)
                 (or builtinsp args))
       (die-usage))
 
-    ;; Prepare the builtins.
-    (make-builtin-module)
-
     ;; Do the main parsing job.
     (multiple-value-bind (hunoz nerror nwarn)
        (count-and-report-errors ()
                                             reason))
                           nil)))))
 
+             ;; If there are no output types then there's nothing to do.
+             (unless output-reasons
+               (error "No output types given: nothing to do"))
+
              ;; If we're writing the builtin module then now seems like a
              ;; good time to do that.
              (when builtinsp
-               (clear-the-decks)
                (hack-module *builtin-module*))
 
              ;; Parse and write out the remaining modules.
              (dolist (arg args)
-               (clear-the-decks)
                (hack-module (read-module arg))))))
 
       ;; Report on how well everything worked.