[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 05/13: Fix read-syntax on vectors and arrays
From: |
Andy Wingo |
Subject: |
[Guile-commits] 05/13: Fix read-syntax on vectors and arrays |
Date: |
Thu, 25 Feb 2021 15:39:08 -0500 (EST) |
wingo pushed a commit to branch master
in repository guile.
commit a758ba075a589b688c07384ab8282dc703f9364d
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Thu Feb 25 10:27:22 2021 +0100
Fix read-syntax on vectors and arrays
* module/ice-9/read.scm (%read): Strip annotations from reading
the array elements.
---
module/ice-9/read.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/module/ice-9/read.scm b/module/ice-9/read.scm
index 5b375e1..0724c66 100644
--- a/module/ice-9/read.scm
+++ b/module/ice-9/read.scm
@@ -403,7 +403,7 @@
(error "unknown character name ~a" tok))))))))
(define (read-vector)
- (list->vector (read-parenthesized #\))))
+ (list->vector (map strip-annotation (read-parenthesized #\)))))
(define (read-srfi-4-vector ch)
(read-array ch))
@@ -438,7 +438,7 @@
(expect #\u)
(expect #\8)
(expect #\()
- (u8-list->bytevector (read-parenthesized #\))))
+ (u8-list->bytevector (map strip-annotation (read-parenthesized #\)))))
;; FIXME: We should require a terminating delimiter.
(define (read-bitvector)
@@ -532,7 +532,7 @@
(define (read-elements ch rank)
(unless (eqv? ch #\()
(error "missing '(' in vector or array literal"))
- (let ((elts (read-parenthesized #\))))
+ (let ((elts (map strip-annotation (read-parenthesized #\)))))
(if (zero? rank)
(begin
;; Handle special print syntax of rank zero arrays; see
- [Guile-commits] 09/13: Add syntax-sourcev, (continued)
- [Guile-commits] 09/13: Add syntax-sourcev, Andy Wingo, 2021/02/25
- [Guile-commits] 04/13: Ensure that (syntax ()) results in (), Andy Wingo, 2021/02/25
- [Guile-commits] 03/13: Fix module scoping for datum->syntax with no identifier, Andy Wingo, 2021/02/25
- [Guile-commits] 07/13: Commit updates from newest autoconf, Andy Wingo, 2021/02/25
- [Guile-commits] 11/13: Psyntax uses sourcev internally, Andy Wingo, 2021/02/25
- [Guile-commits] 06/13: Read Scheme via read-syntax, Andy Wingo, 2021/02/25
- [Guile-commits] 01/13: Add quote-syntax, Andy Wingo, 2021/02/25
- [Guile-commits] 10/13: Assembler writes vector source properties, Andy Wingo, 2021/02/25
- [Guile-commits] 13/13: Shunt syntax-sourcev to (system syntax internal), Andy Wingo, 2021/02/25
- [Guile-commits] 12/13: read-syntax uses vector source representation, Andy Wingo, 2021/02/25
- [Guile-commits] 05/13: Fix read-syntax on vectors and arrays,
Andy Wingo <=
- [Guile-commits] 08/13: Optimize run-time init and relocation procedure, Andy Wingo, 2021/02/25