mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-11 14:57:36 +02:00
Issue #112 - Final version of the reader
This commit is contained in:
parent
d6881ed7d9
commit
b55ff76701
1 changed files with 7 additions and 8 deletions
|
@ -532,14 +532,13 @@
|
|||
(define (parse-atom a)
|
||||
(if (token-numeric? a)
|
||||
(string->number (list->string a))
|
||||
(let ((atom (string->symbol (list->string a))))
|
||||
(if (or (eq? atom +inf.0)
|
||||
(eq? atom -inf.0))
|
||||
(expt 2 1000000)
|
||||
(if (or (eq? atom +nan.0)
|
||||
(eq? atom -nan.0))
|
||||
(/ 0.0 0.0)
|
||||
atom)))))
|
||||
(if (or (equal? a '(#\+ #\i #\n #\f #\. #\0))
|
||||
(equal? a '(#\- #\i #\n #\f #\. #\0)))
|
||||
(expt 2 1000000)
|
||||
(if (or (equal? a '(#\+ #\n #\a #\n #\. #\0))
|
||||
(equal? a '(#\- #\n #\a #\n #\. #\0)))
|
||||
(/ 0.0 0.0)
|
||||
(string->symbol (list->string a))))))
|
||||
|
||||
;;;;;
|
||||
;; Read next character from port, using buffered char if available
|
||||
|
|
Loading…
Add table
Reference in a new issue