use sentri_core::model::ProgramModel;
#[derive(Debug, Clone)]
pub struct AnalysisContext {
pub program: ProgramModel,
pub is_valid: bool,
pub warnings: Vec<String>,
}
impl AnalysisContext {
pub fn new(program: ProgramModel) -> Self {
Self {
program,
is_valid: true,
warnings: Vec::new(),
}
}
pub fn add_warning(&mut self, warning: String) {
self.warnings.push(warning);
}
pub fn mark_invalid(&mut self) {
self.is_valid = false;
}
}