From e1f41ed9fafaf7eb4f2da6878a3fabcf2f7c021e Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 09:13:32 +0000 Subject: feat(driver): compile multiple source files with INCLUDE visibility Reject builds without an entry program and duplicate cross-file definitions. Preserve source order for each unit's own constants and import visible exports. Co-Authored-By: Claude Opus 5.5 --- include/cps/SourceUnit.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 include/cps/SourceUnit.h (limited to 'include/cps/SourceUnit.h') diff --git a/include/cps/SourceUnit.h b/include/cps/SourceUnit.h new file mode 100644 index 0000000..db9ad30 --- /dev/null +++ b/include/cps/SourceUnit.h @@ -0,0 +1,13 @@ +#pragma once +#include "cps/AST.h" +#include +#include + +namespace cps { +// The caller owns the parsed statements for the duration of compilation. +struct SourceUnit { + std::string Path; + const std::vector> &Statements; + std::vector Visible; +}; +} -- cgit v1.3.1-4-g156e