added _bytes/eof
svn: r4447 original commit: 6c2343f20cc5fdf43039308e1425b3584bb4f0d9
This commit is contained in:
parent
54527f8ce4
commit
f84645ec2a
|
@ -710,8 +710,12 @@
|
||||||
(lambda (x) (or x eof)))])
|
(lambda (x) (or x eof)))])
|
||||||
(hash-table-put! table string-type new-type)
|
(hash-table-put! table string-type new-type)
|
||||||
new-type))))))
|
new-type))))))
|
||||||
(provide _string/eof)
|
(provide _string/eof _bytes/eof)
|
||||||
(define-syntax _string/eof
|
(define _bytes/eof
|
||||||
|
(make-ctype string-type
|
||||||
|
(lambda (x) (and (not (eof-object? x)) x))
|
||||||
|
(lambda (x) (or x eof))))
|
||||||
|
(define-syntax _string/eof ; make it a syntax so it depends on the _string type
|
||||||
(syntax-id-rules ()
|
(syntax-id-rules ()
|
||||||
[(_ . xs) ((string-type->string/eof-type _string) . xs)]
|
[(_ . xs) ((string-type->string/eof-type _string) . xs)]
|
||||||
[_ (string-type->string/eof-type _string)]))
|
[_ (string-type->string/eof-type _string)]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user