mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-03 19:26:36 +02:00
parent
ed37af2dfd
commit
f8600d444f
2 changed files with 5 additions and 2 deletions
|
@ -16,6 +16,7 @@
|
||||||
(test-scribble '((foo 1 2 "3 4")) "\\foo[1 2]{3 4}")
|
(test-scribble '((foo 1 2 "3 4")) "\\foo[1 2]{3 4}")
|
||||||
(test-scribble '((foo 1 2 3 4)) "\\foo[1 2 3 4]")
|
(test-scribble '((foo 1 2 3 4)) "\\foo[1 2 3 4]")
|
||||||
(test-scribble '(123.456) "\\123.456")
|
(test-scribble '(123.456) "\\123.456")
|
||||||
|
(test-scribble '((123.456)) "\\(123.456)")
|
||||||
(test-scribble '((123.456)) "\\(123.456 )")
|
(test-scribble '((123.456)) "\\(123.456 )")
|
||||||
(test-scribble '((foo width: 2 "blah blah")) "\\foo[width: 2]{blah blah}")
|
(test-scribble '((foo width: 2 "blah blah")) "\\foo[width: 2]{blah blah}")
|
||||||
(test-scribble '((foo "blah blah" "\n" " yada yada")) "\\foo{blah blah
|
(test-scribble '((foo "blah blah" "\n" " yada yada")) "\\foo{blah blah
|
||||||
|
|
|
@ -53,9 +53,11 @@
|
||||||
|
|
||||||
(define (read-float-tail in acc)
|
(define (read-float-tail in acc)
|
||||||
(let lp ((res acc) (k 0.1))
|
(let lp ((res acc) (k 0.1))
|
||||||
(let ((ch (read-char in)))
|
(let ((ch (peek-char in)))
|
||||||
(cond ((or (eof-object? ch) (char-delimiter? ch)) res)
|
(cond ((or (eof-object? ch) (char-delimiter? ch)) res)
|
||||||
((char-numeric? ch) (lp (+ res (* k (char-digit ch))) (* k 0.1)))
|
((char-numeric? ch)
|
||||||
|
(read-char in)
|
||||||
|
(lp (+ res (* k (char-digit ch))) (* k 0.1)))
|
||||||
(else (error "invalid numeric syntax"))))))
|
(else (error "invalid numeric syntax"))))))
|
||||||
|
|
||||||
(define (read-number in acc base)
|
(define (read-number in acc base)
|
||||||
|
|
Loading…
Add table
Reference in a new issue