Skip to content

Commit 50c8716

Browse files
authored
Merge pull request #228 from montyanderson/handle-trash-whitespace-errors
`ac.rkt`: handle `trash-whitespace` errors – fixes #60 + #199
2 parents e49b1bf + dc93a7c commit 50c8716

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ac.rkt

+4-3
Original file line numberDiff line numberDiff line change
@@ -1446,9 +1446,10 @@ Arc 3.2 documentation: https://arclanguage.github.io/ref.
14461446

14471447

14481448
(define (trash-whitespace)
1449-
(when (and (char-ready?) (char-whitespace? (peek-char)))
1450-
(read-char)
1451-
(trash-whitespace)))
1449+
(with-handlers ([exn:fail:contract? (lambda (exn) (void))])
1450+
(when (and (char-ready?) (char-whitespace? (peek-char)))
1451+
(read-char)
1452+
(trash-whitespace))))
14521453

14531454
(define (tl2 interactive?)
14541455
(when interactive? (display "arc> "))

0 commit comments

Comments
 (0)