diff options
author | dos-reis <gdr@axiomatics.org> | 2011-04-19 07:20:55 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-04-19 07:20:55 +0000 |
commit | c6179efd4a1f1770d4d31415582eabebbe2ab6a0 (patch) | |
tree | b97b313c66be49e76f6f5fcc7e387ab362105c19 /src/boot/strap/translator.clisp | |
parent | a4a45e923a2435574c09619da442fd15e71b2652 (diff) | |
download | open-axiom-c6179efd4a1f1770d4d31415582eabebbe2ab6a0.tar.gz |
* boot/ast.boot (%Module): Now take three arguments.
* boot/parser.boot (bpModuleInterface): Rename from bpExports.
(bpModuleExports): New.
(bpModule): Now allow specification of exported names.
Diffstat (limited to 'src/boot/strap/translator.clisp')
-rw-r--r-- | src/boot/strap/translator.clisp | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp index 0968b9ea..0a0c8ee2 100644 --- a/src/boot/strap/translator.clisp +++ b/src/boot/strap/translator.clisp @@ -581,6 +581,9 @@ (|$InteractiveMode| |expr'|) (T (|shoeEVALANDFILEACTQ| |expr'|))))))) +(DEFUN |exportNames| (|ns|) + (COND ((NULL |ns|) NIL) (T (LIST (CONS 'EXPORT |ns|))))) + (DEFUN |translateToplevel| (|b| |export?|) (PROG (|lhs| |t| |ISTMP#2| |n| |ISTMP#1| |sig| |xs|) (DECLARE (SPECIAL |$activeNamespace| |$InteractiveMode| @@ -600,25 +603,34 @@ (|body| (CADDDR |b|))) (CDR (|bfDef| |op| |args| |body|)))) (|%Module| - (LET ((|m| (CADR |b|)) (|ds| (CADDR |b|))) + (LET ((|m| (CADR |b|)) (|ns| (CADDR |b|)) + (|ds| (CADDDR |b|))) (PROGN (SETQ |$currentModuleName| |m|) (SETQ |$foreignsDefsForCLisp| NIL) (CONS (LIST 'PROVIDE (SYMBOL-NAME |m|)) - (LET ((|bfVar#11| NIL) (|bfVar#10| |ds|) - (|d| NIL)) - (LOOP - (COND - ((OR (ATOM |bfVar#10|) - (PROGN - (SETQ |d| (CAR |bfVar#10|)) - NIL)) - (RETURN (NREVERSE |bfVar#11|))) - (T (SETQ |bfVar#11| - (CONS - (CAR (|translateToplevel| |d| T)) - |bfVar#11|)))) - (SETQ |bfVar#10| (CDR |bfVar#10|)))))))) + (APPEND (|exportNames| |ns|) + (LET + ((|bfVar#11| NIL) (|bfVar#10| |ds|) + (|d| NIL)) + (LOOP + (COND + ((OR (ATOM |bfVar#10|) + (PROGN + (SETQ |d| + (CAR |bfVar#10|)) + NIL)) + (RETURN + (NREVERSE |bfVar#11|))) + (T + (SETQ |bfVar#11| + (CONS + (CAR + (|translateToplevel| |d| + T)) + |bfVar#11|)))) + (SETQ |bfVar#10| + (CDR |bfVar#10|))))))))) (|%Import| (LET ((|m| (CADR |b|))) (PROGN |