whitespace

pull/10/head
Matthew Butterick 8 years ago
parent c8979b15b8
commit 26dd72cb7a

@ -7,11 +7,15 @@
#:source #'NUM)]) #:source #'NUM)])
(syntax/loc caller-stx (syntax/loc caller-stx
(define (LINE-NUM #:error [msg #f]) (define (LINE-NUM #:error [msg #f])
(with-handlers ([line-error? (λ (le) (handle-line-error NUM le))]) (with-handlers
([line-error?
(λ (le) (handle-line-error NUM le))])
(when msg (raise-line-error msg)) (when msg (raise-line-error msg))
STATEMENT ...))))) STATEMENT ...)))))
(define (handle-line-error num le) (define (handle-line-error num le)
(error (format "error in line ~a: ~a" num (line-error-msg le)))) (error (format "error in line ~a: ~a"
num (line-error-msg le))))
(define (raise-line-error str) (raise (line-error str))) (define (raise-line-error str)
(raise (line-error str)))

@ -5,5 +5,4 @@
(struct end-program-signal ()) (struct end-program-signal ())
(struct change-line-signal (val)) (struct change-line-signal (val))
(struct line-error (msg)) (struct line-error (msg))
Loading…
Cancel
Save