use crate::symbol::variable_symbol::VariableSymbol; use std::collections::HashMap; use std::rc::Rc; pub struct BlockScope { debug_name: String, parent_id: usize, variable_symbols: HashMap, Rc>, } impl BlockScope { pub fn new(debug_name: &str, parent_id: usize) -> Self { Self { debug_name: debug_name.into(), parent_id, variable_symbols: HashMap::new(), } } pub fn variable_symbols(&self) -> &HashMap, Rc> { &self.variable_symbols } pub fn variable_symbols_mut(&mut self) -> &mut HashMap, Rc> { &mut self.variable_symbols } pub fn parent_id(&self) -> usize { self.parent_id } }