annotate-build 1.2.5

Build-script support for generating annotate environments
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{AnnotatedFunction, AnnotatedModule};

pub struct Environment {
    pub(crate) modules: Vec<AnnotatedModule>,
    pub(crate) functions: Vec<AnnotatedFunction>,
}

impl Environment {
    pub fn export_to(&self, file_path: impl AsRef<std::path::Path>) {
        crate::generate(
            crate::tokenize(self.modules.as_slice(), self.functions.as_slice()),
            file_path,
        );
    }
}