mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-06 20:56:38 +02:00
Fixing unquote-splicing in srfi-38.
This commit is contained in:
parent
90856b8de2
commit
195cbeca6d
1 changed files with 6 additions and 6 deletions
|
@ -161,8 +161,8 @@
|
|||
(if (and (not (eof-object? c))
|
||||
(or (char-numeric? c)
|
||||
(memv (char-downcase c) '(#\a #\b #\c #\d #\e #\f))))
|
||||
(read-label (cons (read-char in) res))
|
||||
(list->string (reverse res)))))
|
||||
(read-label (cons (read-char in) res))
|
||||
(list->string (reverse res)))))
|
||||
(define (read-number base)
|
||||
(let* ((str (read-label '()))
|
||||
(n (string->number str base))
|
||||
|
@ -344,10 +344,10 @@
|
|||
((#\`) (read-char in) (list 'quasiquote (read-one)))
|
||||
((#\,)
|
||||
(read-char in)
|
||||
(list (if (eqv? #\@ (peek-char in))
|
||||
(begin (read-char in) 'unquote-splicing)
|
||||
'unquote)
|
||||
(read-one)))
|
||||
(let ((sym (if (eqv? #\@ (peek-char in))
|
||||
(begin (read-char in) 'unquote-splicing)
|
||||
'unquote)))
|
||||
(list sym (read-one))))
|
||||
(else
|
||||
(read in))))
|
||||
;; body
|
||||
|
|
Loading…
Add table
Reference in a new issue