- minor change to how export (with renaming) is parsed. When you
rename from-name to to-name, the from-name is now treated as an identifier while the to-name is treated as a symbol.
This commit is contained in:
parent
fcef21c693
commit
0b017898a8
|
@ -1 +1 @@
|
||||||
1592
|
1593
|
||||||
|
|
|
@ -3153,7 +3153,7 @@
|
||||||
(unless (valid-bound-ids? ext*)
|
(unless (valid-bound-ids? ext*)
|
||||||
(syntax-violation 'export "invalid exports"
|
(syntax-violation 'export "invalid exports"
|
||||||
(find-dups ext*)))
|
(find-dups ext*)))
|
||||||
(values (map syntax->datum int*) (map syntax->datum ext*)))
|
(values (map syntax->datum ext*) int*))
|
||||||
(else
|
(else
|
||||||
(syntax-match (car exp*) ()
|
(syntax-match (car exp*) ()
|
||||||
((rename (i* e*) ...)
|
((rename (i* e*) ...)
|
||||||
|
@ -3499,14 +3499,14 @@
|
||||||
(vis-collector vtc))
|
(vis-collector vtc))
|
||||||
(let-values (((init* r mr lex* rhs* internal-exp*)
|
(let-values (((init* r mr lex* rhs* internal-exp*)
|
||||||
(chi-library-internal b* rib top?)))
|
(chi-library-internal b* rib top?)))
|
||||||
(let-values (((exp-int* exp-ext*)
|
(let-values (((exp-name* exp-id*)
|
||||||
(parse-exports (append main-exp* internal-exp*))))
|
(parse-exports (append main-exp* internal-exp*))))
|
||||||
(seal-rib! rib)
|
(seal-rib! rib)
|
||||||
(let* ((init* (chi-expr* init* r mr))
|
(let* ((init* (chi-expr* init* r mr))
|
||||||
(rhs* (chi-rhs* rhs* r mr)))
|
(rhs* (chi-rhs* rhs* r mr)))
|
||||||
(unseal-rib! rib)
|
(unseal-rib! rib)
|
||||||
(let ((loc* (map gen-global lex*))
|
(let ((loc* (map gen-global lex*))
|
||||||
(export-subst (make-export-subst exp-int* exp-ext* rib)))
|
(export-subst (make-export-subst exp-name* exp-id*)))
|
||||||
(define errstr
|
(define errstr
|
||||||
"attempt to export mutated variable")
|
"attempt to export mutated variable")
|
||||||
(let-values (((export-env global* macro*)
|
(let-values (((export-env global* macro*)
|
||||||
|
@ -3733,15 +3733,14 @@
|
||||||
lex*+loc*
|
lex*+loc*
|
||||||
init*)))))
|
init*)))))
|
||||||
|
|
||||||
(define (make-export-subst int* ext* rib)
|
(define (make-export-subst name* id*)
|
||||||
(map
|
(map
|
||||||
(lambda (int ext)
|
(lambda (name id)
|
||||||
(let* ((id (make-stx int top-mark* (list rib) '()))
|
(let ((label (id->label id)))
|
||||||
(label (id->label id)))
|
|
||||||
(unless label
|
(unless label
|
||||||
(stx-error id "cannot export unbound identifier"))
|
(stx-error id "cannot export unbound identifier"))
|
||||||
(cons ext label)))
|
(cons name label)))
|
||||||
int* ext*))
|
name* id*))
|
||||||
|
|
||||||
(define (make-export-env/macros lex* loc* r)
|
(define (make-export-env/macros lex* loc* r)
|
||||||
(define (lookup x)
|
(define (lookup x)
|
||||||
|
|
Loading…
Reference in New Issue