mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-21 20:20:24 +02:00
add syntax-module
* module/ice-9/psyntax.scm (syntax-module): New accessor for syntax objects. * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/boot-9.scm: Declare syntax-module. * doc/ref/api-macros.texi: Document it.
This commit is contained in:
parent
3d51e57cfb
commit
1ace4fbf3d
4 changed files with 7107 additions and 7078 deletions
|
@ -706,6 +706,11 @@ Return the source properties that correspond to the syntax object
|
||||||
@var{x}. @xref{Source Properties}, for more information.
|
@var{x}. @xref{Source Properties}, for more information.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@deffn {Scheme Procedure} syntax-module id
|
||||||
|
Return the name of the module whose source contains the identifier
|
||||||
|
@var{id}.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} syntax-local-binding id
|
@deffn {Scheme Procedure} syntax-local-binding id
|
||||||
Resolve the identifer @var{id}, a syntax object, within the current
|
Resolve the identifer @var{id}, a syntax object, within the current
|
||||||
lexical environment, and return two values, the binding type and a
|
lexical environment, and return two values, the binding type and a
|
||||||
|
|
|
@ -385,6 +385,7 @@ If there is no handler at all, Guile prints an error and then exits."
|
||||||
(define datum->syntax #f)
|
(define datum->syntax #f)
|
||||||
(define syntax->datum #f)
|
(define syntax->datum #f)
|
||||||
(define syntax-source #f)
|
(define syntax-source #f)
|
||||||
|
(define syntax-module #f)
|
||||||
(define identifier? #f)
|
(define identifier? #f)
|
||||||
(define generate-temporaries #f)
|
(define generate-temporaries #f)
|
||||||
(define bound-identifier=? #f)
|
(define bound-identifier=? #f)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2525,6 +2525,11 @@
|
||||||
(set! syntax-source
|
(set! syntax-source
|
||||||
(lambda (x) (source-annotation x)))
|
(lambda (x) (source-annotation x)))
|
||||||
|
|
||||||
|
(set! syntax-module
|
||||||
|
(lambda (id)
|
||||||
|
(arg-check nonsymbol-id? id 'syntax-module)
|
||||||
|
(cdr (syntax-object-module id))))
|
||||||
|
|
||||||
(set! syntax-local-binding
|
(set! syntax-local-binding
|
||||||
(lambda (id)
|
(lambda (id)
|
||||||
(arg-check nonsymbol-id? id 'syntax-local-binding)
|
(arg-check nonsymbol-id? id 'syntax-local-binding)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue