1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
#[salsa::query_group(InputStorage)]
pub trait InputDatabase {
#[salsa::input]
fn input(&self) -> String;
#[salsa::input]
fn recursion_limit(&self) -> Option<usize>;
}
// #[derive(Clone, Debug, PartialEq, Eq, Hash, Default)]
// pub struct Sources {
// manifest: Vec<SourceInfo>,
// }
//
// impl Sources {
// pub fn new(source: String) -> Self {
// Self {
// manifest: vec![SourceInfo::new(source)],
// }
// }
//
// pub fn with_sources(sources: Vec<String>) -> Self {
// Self {
// manifest: sources.into_iter().map(|s| SourceInfo::new(s)).collect(),
// }
// }
//
// pub(crate) fn manifest(&self, source: String) {
// self.manifest.push(SourceInfo::new(source))
// }
// }
//
// #[derive(Clone, Debug, PartialEq, Eq, Hash)]
// pub struct SourceInfo {
// pub(crate) file_id: FileId,
// pub(crate) name: String,
// }
//
// impl SourceInfo {
// pub fn new(name: String) -> Self {
// Self {
// file_id: FileId(Uuid::new_v4()),
// name,
// }
// }
// }
//
// #[derive(Clone, Debug, PartialEq, Eq, Hash)]
// pub struct FileId(Uuid);
//