add #line directive to generated C code to support source debugging

This commit is contained in:
2025-11-30 14:16:38 +03:00
parent b2df79520e
commit 0ef11cdc27
4 changed files with 30 additions and 3 deletions

View File

@@ -9,11 +9,12 @@
(chicken port)
(chicken read-syntax)
(chicken string)
(chicken syntax)
brev-separate
fmt)
(define (read-forms acc)
(let ((r (read)))
(let ((r (read-with-source-info (current-input-port))))
(if (eof-object? r) (reverse acc)
(read-forms (cons r acc)))))