aboutsummaryrefslogtreecommitdiff
path: root/src/boot/strap/parser.clisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/strap/parser.clisp')
-rw-r--r--src/boot/strap/parser.clisp27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/boot/strap/parser.clisp b/src/boot/strap/parser.clisp
index 7b978080..89cb3dee 100644
--- a/src/boot/strap/parser.clisp
+++ b/src/boot/strap/parser.clisp
@@ -461,19 +461,26 @@
(DEFUN |bpExportItemList| () (|bpListAndRecover| #'|bpExportItem|))
-(DEFUN |bpExports| () (|bpPileBracketed| #'|bpExportItemList|))
+(DEFUN |bpModuleInterface| ()
+ (COND
+ ((|bpEqKey| 'WHERE)
+ (OR (|bpPileBracketed| #'|bpExportItemList|)
+ (AND (|bpExportItem|) (|bpPush| (LIST (|bpPop1|))))
+ (|bpTrap|)))
+ (T (|bpPush| NIL))))
+
+(DEFUN |bpModuleExports| ()
+ (COND
+ ((|bpParenthesized| #'|bpIdList|)
+ (|bpPush| (|bfUntuple| (|bpPop1|))))
+ (T (|bpPush| NIL))))
(DEFUN |bpModule| ()
(COND
- ((|bpEqKey| 'MODULE)
- (IDENTITY
- (PROGN
- (OR (|bpName|) (|bpTrap|))
- (COND
- ((|bpEqKey| 'WHERE)
- (AND (|bpExports|)
- (|bpPush| (|%Module| (|bpPop2|) (|bpPop1|)))))
- (T (|bpPush| (|%Module| (|bpPop1|) NIL)))))))))
+ ((|bpEqKey| 'MODULE) (OR (|bpName|) (|bpTrap|)) (|bpModuleExports|)
+ (|bpModuleInterface|)
+ (|bpPush| (|%Module| (|bpPop3|) (|bpPop2|) (|bpPop1|))))
+ (T NIL)))
(DEFUN |bpImport| ()
(PROG (|a|)