More simplification.
authorChris Hanson <org/chris-hanson/cph>
Sun, 19 Mar 2017 02:13:29 +0000 (19:13 -0700)
committerChris Hanson <org/chris-hanson/cph>
Sun, 19 Mar 2017 02:13:29 +0000 (19:13 -0700)
src/runtime/parse.scm

index 7881242f11ccc5211027e3802a6b5078a16ad408..47d77e5a28f3a1ab4588067dcd49fdd8eaf95606 100644 (file)
@@ -733,17 +733,11 @@ USA.
               (%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)