From 42bc8d2859c3575a32f2173d03b39dfbbe1066bf Mon Sep 17 00:00:00 2001 From: Justine Frank Date: Thu, 19 Feb 2026 14:48:11 -0500 Subject: [PATCH] remove offending line logic --- a86/interp.rkt | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/a86/interp.rkt b/a86/interp.rkt index a94037d..0d7e8e9 100644 --- a/a86/interp.rkt +++ b/a86/interp.rkt @@ -215,30 +215,9 @@ "if you did and still get this error; please share with course staff.")) (define (clang:error msg) - (raise (exn:clang (format "~a\n\n~a~a" assembly-error-msg msg (assembly-offending-line msg)) + (raise (exn:clang (format "~a\n\n~a" assembly-error-msg msg) (current-continuation-marks)))) -(define (assembly-offending-line msg) - (match (regexp-match - "(.*):([0-9]+):([0-9]+): error: " msg) - [(list _ (app string->path file) (app string->number line) (app string->number offset)) - (define line-text - (with-input-from-file file - (thunk - (let loop ([l (read-line)] - [i line]) - (if (= i 1) - l - (loop (read-line) (sub1 i))))))) - (match (regexp-match "[ ]*(.*)" line-text) - [(list _ trimmed-line) - (format - "\noffending line: ~a\n ~a^" - trimmed-line - (make-string offset #\space))])] - [_ ""])) - - ;; run clang on t.s to create t.o (define (clang t.s t.o) (define err-port (open-output-string))