26 lines
511 B
Rust
26 lines
511 B
Rust
use crate::diagnostics::span::Span;
|
|
|
|
pub mod span;
|
|
pub mod emitters;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
pub struct Diagnostic {
|
|
pub diag_type: DiagnosticType,
|
|
pub spans: Vec<SpanWithLabel>,
|
|
pub message: String,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub enum DiagnosticType {
|
|
Error,
|
|
Warning,
|
|
Help,
|
|
SecondaryError
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
pub struct SpanWithLabel {
|
|
pub span: Span,
|
|
pub span_type: DiagnosticType,
|
|
pub label: Option<String>,
|
|
} |