Allowing fractions with prefixes in srfi-38.

This commit is contained in:
Alex Shinn 2012-11-04 00:35:55 +09:00
parent 5f323551c9
commit c55fa6fe4d

View file

@ -165,6 +165,8 @@
(read-label (cons (read-char in) res))) (read-label (cons (read-char in) res)))
((and (memv c '(#\+ #\-)) (null? res)) ((and (memv c '(#\+ #\-)) (null? res))
(read-label (cons (read-char in) res))) (read-label (cons (read-char in) res)))
((and (eqv? c #\/) (not (memv #\/ res)))
(read-label (cons (read-char in) res)))
(else (else
(list->string (reverse res)))))) (list->string (reverse res))))))
(define (read-number base) (define (read-number base)