(%atom-end? db))
char)
((char=? char #\x)
- (let ((builder (string-builder)))
- (let loop ()
- (if (not (%atom-end? db))
- (begin
- (builder (%read-char db))
- (loop))))
- (let* ((string (builder))
- (cp (string->number string 16 #t)))
- (if (not (unicode-code-point? cp))
- (error:illegal-code-point string))
- (integer->char cp))))
+ (let* ((string (parse-atom db '()))
+ (cp (string->number string 16 #t)))
+ (if (not (unicode-code-point? cp))
+ (error:illegal-code-point string))
+ (integer->char cp)))
(else
(let ((builder (string-builder)))
(builder char)