X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/7bfe3a370a6a56a0f097fc1e357ca8ac798d9d4b..65d7091b894b40e4249f0bdede2526ec8fa6e513:/src/frontend.lisp diff --git a/src/frontend.lisp b/src/frontend.lisp index e7b515a..e293f29 100644 --- a/src/frontend.lisp +++ b/src/frontend.lisp @@ -30,6 +30,11 @@ (cl:in-package #:sod-frontend) ;;;-------------------------------------------------------------------------- +;;; Preparation for dumping. + +(make-builtin-module) + +;;;-------------------------------------------------------------------------- ;;; The main program. (eval-when (:compile-toplevel :load-toplevel :execute) @@ -81,11 +86,11 @@ ;; Option definitions. (define-program :help "Process SOD input files to produce (e.g.) C output." - :version "0.1.0" + :version *sod-version* :usage "SOURCES..." :options (options (help-options :short-version #\V) - "Crazy options" + "Translator options" (#\I "include" (:arg "DIR") ("Search DIR for module imports.") (list *module-dirs* 'string)) @@ -110,9 +115,6 @@ (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 () @@ -169,12 +171,10 @@ ;; 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.