use ktrs_ast::{Ast, NodeId};
pub trait Emitter {
fn report(&mut self, ast: &Ast, element: NodeId, error_message: &str, can_be_auto_corrected: bool) -> Decision;
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Decision {
Fix,
Ignore,
}
impl Decision {
pub fn if_fix(self, block: impl FnOnce()) {
if self == Decision::Fix {
block();
}
}
}