guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 04/04: Scheme read respects "positions" reader option


From: Andy Wingo
Subject: [Guile-commits] 04/04: Scheme read respects "positions" reader option
Date: Wed, 17 Feb 2021 06:15:07 -0500 (EST)

wingo pushed a commit to branch master
in repository guile.

commit 71e53d73fee798c4cadf795e87d3efe1b12ebf04
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Wed Feb 17 12:14:15 2021 +0100

    Scheme read respects "positions" reader option
    
    * module/ice-9/read.scm (read): Don't add source positions if the option
      is off.
---
 module/ice-9/read.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/module/ice-9/read.scm b/module/ice-9/read.scm
index 04e3cac..be072f9 100644
--- a/module/ice-9/read.scm
+++ b/module/ice-9/read.scm
@@ -146,7 +146,8 @@
   (define (annotate line column datum)
     ;; FIXME: Return a syntax object instead, so we can avoid the
     ;; srcprops side table.
-    (when (and (supports-source-properties? datum)
+    (when (and (record-positions?)
+               (supports-source-properties? datum)
                ;; Line or column can be invalid via set-port-column! or
                ;; ungetting chars beyond start of line.
                (<= 0 line)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]