pub_just/
compilation.rs

1use super::*;
2
3#[derive(Debug)]
4pub struct Compilation<'src> {
5  pub asts: HashMap<PathBuf, Ast<'src>>,
6  pub justfile: Justfile<'src>,
7  pub root: PathBuf,
8  pub srcs: HashMap<PathBuf, &'src str>,
9}
10
11impl<'src> Compilation<'src> {
12  pub fn root_ast(&self) -> &Ast<'src> {
13    self.asts.get(&self.root).unwrap()
14  }
15
16  pub fn root_src(&self) -> &'src str {
17    self.srcs.get(&self.root).unwrap()
18  }
19}