Added get-datum.
This commit is contained in:
parent
043425eb20
commit
63f656896f
|
@ -15,14 +15,14 @@
|
|||
|
||||
|
||||
(library (ikarus reader)
|
||||
(export read read-initial read-token comment-handler)
|
||||
(export read read-initial read-token comment-handler get-datum)
|
||||
(import
|
||||
(ikarus system $chars)
|
||||
(ikarus system $fx)
|
||||
(ikarus system $pairs)
|
||||
(ikarus system $bytevectors)
|
||||
(only (ikarus unicode-data) unicode-printable-char?)
|
||||
(except (ikarus) read read-token comment-handler))
|
||||
(except (ikarus) read read-token comment-handler get-datum))
|
||||
|
||||
(define delimiter?
|
||||
(lambda (c)
|
||||
|
@ -1170,6 +1170,11 @@
|
|||
(my-read p)
|
||||
(error 'read "not an input port" p))]))
|
||||
|
||||
(define (get-datum p)
|
||||
(unless (input-port? p)
|
||||
(error 'get-datum "not an input port"))
|
||||
(my-read p))
|
||||
|
||||
(define comment-handler
|
||||
(make-parameter
|
||||
(lambda (x) (void))
|
||||
|
|
|
@ -1 +1 @@
|
|||
1106
|
||||
1107
|
||||
|
|
|
@ -1062,7 +1062,7 @@
|
|||
[get-bytevector-n! r ip]
|
||||
[get-bytevector-some r ip]
|
||||
[get-char i r ip]
|
||||
[get-datum r ip]
|
||||
[get-datum i r ip]
|
||||
[get-line i r ip]
|
||||
[get-string-all r ip]
|
||||
[get-string-n r ip]
|
||||
|
|
Loading…
Reference in New Issue