mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
ice-9/read: Parse #{}}# properly.
This is a regression since Guile 3.0.2 and breaks compilation of a Guile library. * module/ice-9/read.scm (%read)[read-parenthesized]: When SAW-BRACE? is #t but CH isn't #\#, don't eat CH. * test-suite/tests/reader.test ("#{}#): Add four test cases.
This commit is contained in:
parent
d79a226359
commit
c78c130b1d
2 changed files with 10 additions and 2 deletions
|
@ -556,12 +556,15 @@
|
|||
(string->symbol
|
||||
(list->string
|
||||
(let lp ((saw-brace? #f))
|
||||
(let ((ch (next-not-eof)))
|
||||
(let lp/inner ((ch (next-not-eof))
|
||||
(saw-brace? saw-brace?))
|
||||
(cond
|
||||
(saw-brace?
|
||||
(if (eqv? ch #\#)
|
||||
'()
|
||||
(cons #\} (lp #f))))
|
||||
;; Don't eat CH, see
|
||||
;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49623>.
|
||||
(cons #\} (lp/inner ch #f))))
|
||||
((eqv? ch #\})
|
||||
(lp #t))
|
||||
((eqv? ch #\\)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue