mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 06:39:17 +02:00
Supporting hex char escapes in extended reader.
This commit is contained in:
parent
6803c7311a
commit
9cae7fada9
1 changed files with 4 additions and 0 deletions
|
@ -187,6 +187,10 @@
|
|||
(define (read-named-char c in)
|
||||
(let ((name (read-name c in)))
|
||||
(cond ((assoc name named-chars string-ci=?) => cdr)
|
||||
((and (or (eqv? c #\x) (eqv? c #\X))
|
||||
(string->number (substring name 1 (string-length name))
|
||||
16))
|
||||
=> integer->char)
|
||||
(else (error "unknown char name" name)))))
|
||||
(define (read-type-id in)
|
||||
(let ((ch (peek-char in)))
|
||||
|
|
Loading…
Add table
Reference in a new issue