From 3d7d1d7cf8685f0d9230cd89d06017869da1c6d8 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 27 Oct 2026 14:00:16 +0000 Subject: feat(library)!: replace #LIB with __LIB source regions Track library mode by original source line, including deferred template bodies and automatic object cleanup. Update call lines from ordinary code and migrate the embedded standard library to PP_DEFINE __LIB. Co-Authored-By: Claude Opus 5.5 --- include/cps/SourceUnit.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/cps/SourceUnit.h') diff --git a/include/cps/SourceUnit.h b/include/cps/SourceUnit.h index 34266ac..153d020 100644 --- a/include/cps/SourceUnit.h +++ b/include/cps/SourceUnit.h @@ -9,6 +9,9 @@ struct SourceUnit { std::string Path; const std::vector> &Statements; std::vector Visible; - bool IsLibrary = false; + std::vector LibraryLines; + bool isLibrary(int Line) const { + return Line > 0 && static_cast(Line) <= LibraryLines.size() && LibraryLines[Line - 1]; + } }; } -- cgit v1.3.1-4-g156e