turtle-build 0.5.1

Ninja-compatible build system for high-level programming languages
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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(),
        }
    }
}