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

@@ -1,6 +1,7 @@
(declare (unit sexc)
(uses fmt-c-writer
sex-reader
utils
semen))
(include "utils.macros.scm")
@@ -154,6 +155,7 @@
(return #f))
(load-persistent-module-paths)
(sex-fmt-current-file (to-absolute-pathname input))
(let* ((raw-forms (append prelude (read-raw-forms input)))
(sex-forms (semantic-process-forms raw-forms input)))
(if (or (get-arg args 'macro-expand #f)