1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 17:50:29 +02:00

Fix bug for read-syntax on ( . args)

* module/ice-9/boot-9.scm: Capture syntax?.
* module/ice-9/read.scm (read-syntax): Avoid re-annotating objects.
* test-suite/tests/reader.test ("read-syntax"): Add test.
This commit is contained in:
Andy Wingo 2021-05-01 20:43:07 +02:00
parent 3bce507407
commit 3383a2cb10
3 changed files with 25 additions and 7 deletions

View file

@ -20,8 +20,9 @@
;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
(define-module (test-suite reader)
:use-module (srfi srfi-1)
:use-module (test-suite lib))
#:use-module (srfi srfi-1)
#:use-module (test-suite lib)
#:use-module (system syntax internal))
(define exception:eof
@ -546,6 +547,10 @@
(with-test-prefix "deprecated #{}# escapes"
(pass-if (equal? (read-string "#{a\\ b}#") '#{a b}#))))
(with-test-prefix "read-syntax"
(pass-if-equal "annotations" 'args
(syntax-expression (call-with-input-string "( . args)" read-syntax))))
;;; Local Variables:
;;; eval: (put 'with-read-options 'scheme-indent-function 1)
;;; End: