mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +02:00
make expand-support structure constructors take a source argument
* module/ice-9/expand-support.scm (make-module-ref, make-lexical): Add source arguments to these constructors. * module/ice-9/psyntax.scm: * module/ice-9/psyntax-pp.scm: Adapt to match, though we don't wire everything up yet.
This commit is contained in:
parent
f27e9e11cd
commit
1aeb082b82
3 changed files with 8 additions and 8 deletions
|
@ -102,7 +102,7 @@
|
|||
(define (module-ref? x)
|
||||
(and (struct? x) (eq? (struct-vtable x) <module-ref>)))
|
||||
|
||||
(define (make-module-ref modname symbol public?)
|
||||
(define (make-module-ref source modname symbol public?)
|
||||
(make-struct <module-ref> 0 modname symbol public?))
|
||||
|
||||
(define (module-ref-modname a)
|
||||
|
@ -126,7 +126,7 @@
|
|||
(define (lexical? x)
|
||||
(and (struct? x) (eq? (struct-vtable x) <lexical>)))
|
||||
|
||||
(define (make-lexical name gensym)
|
||||
(define (make-lexical source name gensym)
|
||||
(make-struct <lexical> 0 name gensym))
|
||||
|
||||
(define (lexical-name a)
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -371,7 +371,7 @@
|
|||
(build-annotated
|
||||
source
|
||||
(case (fluid-ref *mode*)
|
||||
((c) ((@ (ice-9 expand-support) make-lexical) name var))
|
||||
((c) ((@ (ice-9 expand-support) make-lexical) source name var))
|
||||
(else var)))))
|
||||
|
||||
(define build-lexical-assignment
|
||||
|
@ -398,19 +398,19 @@
|
|||
(let ((make-module-ref
|
||||
(case (fluid-ref *mode*)
|
||||
((c) (@ (ice-9 expand-support) make-module-ref))
|
||||
(else (lambda (mod var public?)
|
||||
(else (lambda (source mod var public?)
|
||||
(list (if public? '@ '@@) mod var)))))
|
||||
(kind (car mod))
|
||||
(mod (cdr mod)))
|
||||
(case kind
|
||||
((public) (make-module-ref mod var #t))
|
||||
((public) (make-module-ref #f mod var #t))
|
||||
((private) (if (not (equal? mod (module-name (current-module))))
|
||||
(make-module-ref mod var #f)
|
||||
(make-module-ref #f mod var #f)
|
||||
var))
|
||||
((bare) var)
|
||||
((hygiene) (if (and (not (equal? mod (module-name (current-module))))
|
||||
(module-variable (resolve-module mod) var))
|
||||
(make-module-ref mod var #f)
|
||||
(make-module-ref #f mod var #f)
|
||||
var))
|
||||
(else (syntax-violation #f "bad module kind" var mod))))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue