use alloc::sync::Arc;
use train_map::TrainMap;
#[derive(Clone, Debug)]
pub struct ModuleState<'a, 'm> {
pub rules: TrainMap<'m, &'a str, Vec<(&'a str, Arc<str>)>>,
pub variables: TrainMap<'m, &'a str, Arc<str>>,
}
impl<'m> ModuleState<'_, 'm> {
pub fn fork(&'m self) -> Self {
Self {
rules: self.rules.fork(),
variables: self.variables.fork(),
}
}
}