//! Grouped `CompileCtx` sub-contexts. //! //! Splits the compiler's central `CompileCtx` so syntax-domain workers borrow //! only the slice they need: `LabelCtx` for jump-target resolution, `ScopeCtx` //! for identifier binding. `PatternCtx` is reserved for destructuring work. //! Execution-stream fields (bytecode, registers, pc, …) stay flat on //! `CompileCtx`. use std::collections::HashMap; use crate::compiler::{Label, LabelScope}; use crate::symbol_table::SymbolTable; /// Jump-target / labeled-statement resolution state. pub(crate) struct LabelCtx { pub(crate) label_map: HashMap, pub(crate) loop_stack: Vec<(Label, Label)>, #[allow(dead_code)] pub(crate) switch_stack: Vec