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

This commit was merged in pull request #23.
This commit is contained in:
2025-11-30 14:16:38 +03:00
committed by Pavel Kulyov
parent b2df79520e
commit f5b3fcb399
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)))))