Remove double read-char in scribble parser.

Closes #1018.
This commit is contained in:
Alex Shinn 2025-03-22 11:20:04 +09:00
parent 72ec53ca26
commit ed37af2dfd
2 changed files with 3 additions and 1 deletions

View file

@ -15,6 +15,8 @@
(test-scribble '((foo "blah \"blah\" (`blah'?)")) "\\foo{blah \"blah\" (`blah'?)}")
(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 '((foo width: 2 "blah blah")) "\\foo[width: 2]{blah blah}")
(test-scribble '((foo "blah blah" "\n" " yada yada")) "\\foo{blah blah
yada yada}")

View file

@ -67,7 +67,7 @@
((eqv? #\. ch)
(read-char in)
(if (= base 10)
(begin (read-char in) (read-float-tail in (inexact acc)))
(read-float-tail in (inexact acc))
(error "non-base-10 floating point")))
(else (error "invalid numeric syntax"))))))