mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Cleanup
This commit is contained in:
parent
7794cbd98f
commit
de1a97fbe7
2 changed files with 17 additions and 16 deletions
27
cyclone.scm
27
cyclone.scm
|
@ -949,16 +949,21 @@ Debug options:
|
|||
(else
|
||||
(with-handler
|
||||
(lambda (err)
|
||||
;(parameterize ((current-input-port (current-error-port))))
|
||||
(display "Error: " (current-error-port))
|
||||
(display (car err) (current-error-port))
|
||||
(newline (current-error-port))
|
||||
(for-each
|
||||
(lambda (obj)
|
||||
(write obj (current-error-port))
|
||||
(newline (current-error-port)))
|
||||
(cdr err))
|
||||
(newline (current-error-port))
|
||||
(exit 1) )
|
||||
;; Top-level exception handler for the compiler.
|
||||
;;
|
||||
;; We set this up since call history is generally
|
||||
;; pointless for users of the compiler, so we don't
|
||||
;; want to display it.
|
||||
(parameterize ((current-output-port (current-error-port)))
|
||||
(display "Error: ")
|
||||
(display (car err))
|
||||
(newline)
|
||||
(for-each
|
||||
(lambda (obj)
|
||||
(write obj)
|
||||
(newline))
|
||||
(cdr err))
|
||||
(newline)
|
||||
(exit 1)))
|
||||
(run-compiler non-opts compile? cc-prog cc-exec cc-lib cc-so cc-linker-opts append-dirs prepend-dirs)))))
|
||||
|
||||
|
|
|
@ -236,14 +236,10 @@
|
|||
(begin
|
||||
(define *source-loc-lis* '())
|
||||
(define (error/loc reason expr)
|
||||
;(Cyc-write expr (current-error-port))
|
||||
;(Cyc-display #\newline (current-error-port))
|
||||
(let* ((found (assoc expr *source-loc-lis*))
|
||||
(loc-vec (if found
|
||||
(cdr found) ;; Get value
|
||||
#f)))
|
||||
;(Cyc-display loc-vec (current-error-port))
|
||||
;(Cyc-display #\newline (current-error-port))
|
||||
(if loc-vec
|
||||
(error
|
||||
(string-append
|
||||
|
@ -253,7 +249,7 @@
|
|||
(vector-ref loc-vec 0)
|
||||
" line "
|
||||
(number->string (vector-ref loc-vec 1))
|
||||
", char "
|
||||
", column "
|
||||
(number->string (vector-ref loc-vec 2)))
|
||||
expr)
|
||||
(error
|
||||
|
|
Loading…
Add table
Reference in a new issue