use chappi_syntax::{Diagnostic, Severity, Span};
pub(crate) fn error(
code: &str,
span: Span,
semantic_path: Vec<String>,
message: impl Into<String>,
hint: Option<String>,
) -> Diagnostic {
Diagnostic {
code: code.to_owned(),
severity: Severity::Error,
span,
semantic_path,
message: message.into(),
hint,
}
}