add content to deps

This commit is contained in:
2026-03-24 13:40:34 +00:00
parent d2bf437f53
commit f28d7515b8
45 changed files with 832 additions and 44 deletions
@@ -7,9 +7,4 @@ description = "Canonical language contract for Prometeu Backend: identifiers, re
repository = "https://github.com/prometeu/runtime"
[dependencies]
serde = { version = "1", features = ["derive"], optional = true }
thiserror = "1"
[features]
default = []
serde = ["dep:serde"]
@@ -0,0 +1,21 @@
#[derive(Debug, Clone)]
pub struct SourcePolicy {
pub extensions: Vec<&'static str>,
pub case_sensitive: bool,
}
impl SourcePolicy {
pub fn matches_ext(&self, ext: &str) -> bool {
if self.case_sensitive {
self.extensions.iter().any(|e| *e == ext)
} else {
self.extensions.iter().any(|e| e.eq_ignore_ascii_case(ext))
}
}
}
#[derive(Debug, Clone)]
pub struct LanguageSpec {
pub id: &'static str,
pub source_policy: SourcePolicy,
}
@@ -1 +1,3 @@
mod language_spec;
pub use language_spec::*;