[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Syntax locations are ambiguous: can we track source 'offset' and 'le
Re: Syntax locations are ambiguous: can we track source 'offset' and 'length'?
Wed, 04 Aug 2021 14:05:59 +0200
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Vivien Kraus via General Guile related discussions <email@example.com>
> I am trying to use the guile reader to read scheme comments, in
> addition to the syntax elements. I know with syntax-source where a
> syntax object starts, and I can know where it ends by using a spying
> soft port and re-reading it. However, the #\return ambiguity makes all
> my efforts pointless.
As you know, ‘read-syntax’ appeared in 3.0.7, so it’s brand new and we
could certainly extend (ice-9 read) with more features, including
In the meantime, I needed the ability to read comments in Guix,
including with Guile < 3.0.7, so I hacked up this thing:
It can read and write while preserving comments.
Again, we could/should probably integrate that functionality in (ice-9
read) eventually, it shouldn’t be too hard.