pub fn codegen_program_mapped(
stmts: &[Stmt<'_>],
registry: &TypeRegistry,
policies: &PolicyRegistry,
interner: &Interner,
type_env: &TypeEnv,
cfg: &OptimizationConfig,
stmt_spans: &[Span],
logos_source: &str,
) -> (String, SourceMap)Expand description
Like codegen_program, but also builds the rustc→LOGOS SourceMap:
every generated line maps to the top-level statement that produced it
(stmt_spans is the parser’s side-table, 1:1 with stmts; zero-width
spans mark prelude statements and are skipped), and variable origins carry
ownership roles for the diagnostic bridge. This is the flycheck substrate.