summaryrefslogtreecommitdiff
path: root/module/ice-9/psyntax.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-01-23 12:31:33 +0100
committerAndy Wingo <wingo@pobox.com>2012-01-25 20:34:17 +0100
commit1ace4fbf3dcacee77540aaaa49e032bad9ed9e27 (patch)
tree6129daa01ae17cd9fdf17d43726da10dad87a5a8 /module/ice-9/psyntax.scm
parent3d51e57cfb0404db568a6adfde2a346d3fd9907e (diff)
downloadguile-1ace4fbf3dcacee77540aaaa49e032bad9ed9e27.tar.gz
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.
Diffstat (limited to 'module/ice-9/psyntax.scm')
-rw-r--r--module/ice-9/psyntax.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm
index 024bb8535..00cb54948 100644
--- a/module/ice-9/psyntax.scm
+++ b/module/ice-9/psyntax.scm
@@ -2525,6 +2525,11 @@
(set! syntax-source
(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
(lambda (id)
(arg-check nonsymbol-id? id 'syntax-local-binding)