unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
To: guile-devel@gnu.org
Subject: Re: Improved (and faster) reader
Date: Thu, 23 Aug 2007 11:08:07 +1000	[thread overview]
Message-ID: <87hcmr83d4.fsf@zip.com.au> (raw)
In-Reply-To: <87zm1ojsie.fsf@chbouib.org> ("Ludovic Courtès"'s message of "Sun, 22 Jul 2007 18:46:33 +0200")

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:
>
> +scm_read_quote (int chr, SCM port)

I think you may have lost source properties from quote and quasi-quote
forms,

	(read-enable 'positions)
	(source-properties (read (open-input-string "'x")))
	=> ()

There wasn't a case in reader.test for that:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: reader.test.quote-positions.diff --]
[-- Type: text/x-diff, Size: 576 bytes --]

--- reader.test	16 Aug 2007 07:43:43 +1000	1.7.6.1
+++ reader.test	21 Aug 2007 18:11:04 +1000	
@@ -152,5 +152,12 @@
                   (lambda ()
                     (read-string "(+ 1 2 3)")))))
       (and (equal? (source-property sexp 'line) 0)
+           (equal? (source-property sexp 'column) 0))))
+
+  (pass-if "positions on quote"
+    (let ((sexp (with-read-options '(positions)
+                  (lambda ()
+                    (read-string "'x")))))
+      (and (equal? (source-property sexp 'line) 0)
            (equal? (source-property sexp 'column) 0)))))
 

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

  parent reply	other threads:[~2007-08-23  1:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14 18:21 Further profiling, including howto Andy Wingo
2007-07-22 16:46 ` Improved (and faster) reader Ludovic Courtès
2007-08-11 10:52   ` Ludovic Courtès
2007-08-23  1:08   ` Kevin Ryde [this message]
2007-08-23 21:19     ` Ludovic Courtès
2007-08-25  0:45       ` Kevin Ryde
2007-08-25  8:23         ` Ludovic Courtès
2007-08-25 13:15           ` Andy Wingo
2007-08-26 17:05             ` Ludovic Courtès
2007-09-03 16:59     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hcmr83d4.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).