Skip to content

Commit

Permalink
Merge pull request #228 from montyanderson/handle-trash-whitespace-er…
Browse files Browse the repository at this point in the history
…rors

`ac.rkt`: handle `trash-whitespace` errors – fixes #60 + #199
  • Loading branch information
akkartik authored May 20, 2024
2 parents e49b1bf + dc93a7c commit 50c8716
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ac.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -1446,9 +1446,10 @@ Arc 3.2 documentation: https://arclanguage.github.io/ref.


(define (trash-whitespace)
(when (and (char-ready?) (char-whitespace? (peek-char)))
(read-char)
(trash-whitespace)))
(with-handlers ([exn:fail:contract? (lambda (exn) (void))])
(when (and (char-ready?) (char-whitespace? (peek-char)))
(read-char)
(trash-whitespace))))

(define (tl2 interactive?)
(when interactive? (display "arc> "))
Expand Down

0 comments on commit 50c8716

Please sign in to comment.