use crate::symbol::parameter_symbol::ParameterSymbol; use std::cell::RefCell; use std::collections::HashMap; use std::rc::Rc; pub struct FunctionScope { debug_name: String, parent_id: usize, parameter_symbols: HashMap, Rc>>, } impl FunctionScope { pub fn new(debug_name: &str, parent_id: usize) -> Self { Self { debug_name: debug_name.into(), parent_id, parameter_symbols: HashMap::new(), } } pub fn parameter_symbols(&self) -> &HashMap, Rc>> { &self.parameter_symbols } pub fn parameter_symbols_mut(&mut self) -> &mut HashMap, Rc>> { &mut self.parameter_symbols } pub fn parent_id(&self) -> usize { self.parent_id } }