[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/03: Document syntax-sourcev
From: |
Andy Wingo |
Subject: |
[Guile-commits] 03/03: Document syntax-sourcev |
Date: |
Tue, 9 Mar 2021 14:50:54 -0500 (EST) |
wingo pushed a commit to branch master
in repository guile.
commit 5046385df8ca6ad6677bb1cfff6a77ec0448301d
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Tue Mar 9 20:50:08 2021 +0100
Document syntax-sourcev
* NEWS: Add doc link.
* doc/ref/api-macros.texi (Syntax Transformer Helpers): Document
syntax-sourcev.
* module/system/syntax.scm: Re-export syntax-sourcev.
---
NEWS | 2 ++
doc/ref/api-macros.texi | 7 +++++++
module/system/syntax.scm | 3 ++-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index d985a0d..74a2641 100644
--- a/NEWS
+++ b/NEWS
@@ -178,6 +178,8 @@ See "Syntax Case" in the manual.
** `syntax-sourcev'
+See "Syntax Transformer Helpers" in the manual.
+
* Bug fixes
** Fix reverse-list->string docstring
diff --git a/doc/ref/api-macros.texi b/doc/ref/api-macros.texi
index 14e0852..cdb33df 100644
--- a/doc/ref/api-macros.texi
+++ b/doc/ref/api-macros.texi
@@ -862,6 +862,13 @@ Return the name of the module whose source contains the
identifier
@var{id}.
@end deffn
+@deffn {Scheme Procedure} syntax-sourcev stx
+Like @code{syntax-source}, but returns its result in a more compact
+@code{#(@var{filename} @var{line} @var{column})} format. This format is
+used as the internal representation of source locations for syntax
+objects.
+@end deffn
+
@deffn {Scheme Procedure} syntax-local-binding id
[#:resolve-syntax-parameters?=#t]
Resolve the identifer @var{id}, a syntax object, within the current
lexical environment, and return two values, the binding type and a
diff --git a/module/system/syntax.scm b/module/system/syntax.scm
index ee85212..6d8c967 100644
--- a/module/system/syntax.scm
+++ b/module/system/syntax.scm
@@ -24,7 +24,8 @@
syntax-local-binding
(%syntax-module . syntax-module)
syntax-locally-bound-identifiers
- syntax-session-id))
+ syntax-session-id
+ syntax-sourcev))
;; Used by syntax.c.
(define (print-syntax obj port)