diff options
Diffstat (limited to 'src/interp/fnewmeta.lisp')
-rw-r--r-- | src/interp/fnewmeta.lisp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/interp/fnewmeta.lisp b/src/interp/fnewmeta.lisp index 9867963c..3a0ffa89 100644 --- a/src/interp/fnewmeta.lisp +++ b/src/interp/fnewmeta.lisp @@ -444,15 +444,25 @@ (DEFUN |PARSE-Import| () - (AND (MATCH-ADVANCE-STRING "import") (MUST (|PARSE-Expr| 1000)) - (BANG FIL_TEST - (OPTIONAL - (STAR REPEATOR - (AND (MATCH-ADVANCE-STRING ",") - (MUST (|PARSE-Expr| 1000)))))) - (PUSH-REDUCTION '|PARSE-Import| - (CONS '|import| - (CONS (POP-STACK-2) (APPEND (POP-STACK-1) NIL)))))) + (AND (MATCH-ADVANCE-STRING "import") + (MUST (|PARSE-Expr| 1000)) + (OR (AND (MATCH-ADVANCE-STRING ":") + (MUST (|PARSE-Expression|)) + (MUST (MATCH-ADVANCE-STRING "from")) + (MUST (|PARSE-Expr| 1000)) + (PUSH-REDUCTION '|PARSE-Import| + (CONS '|%SignatureImport| + (CONS (POP-STACK-3) + (CONS (POP-STACK-2) + (CONS (POP-STACK-1) NIL)))))) + (AND (BANG FIL_TEST + (OPTIONAL + (STAR REPEATOR + (AND (MATCH-ADVANCE-STRING ",") + (MUST (|PARSE-Expr| 1000)))))) + (PUSH-REDUCTION '|PARSE-Import| + (CONS '|import| + (CONS (POP-STACK-2) (APPEND (POP-STACK-1) NIL)))))))) ;; domain inlining. Same syntax as import directive; except ;; deliberate restriction on naming one type at a time. |