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