2021-06-06 17:55:05 +02:00
|
|
|
#[cfg_attr(feature = "debug", derive(Debug))]
|
2021-05-07 07:19:58 +02:00
|
|
|
#[derive(Eq, PartialEq)]
|
2021-03-11 08:31:49 +01:00
|
|
|
pub enum Severity {
|
|
|
|
Error,
|
|
|
|
Warning,
|
|
|
|
Info,
|
|
|
|
Hint,
|
|
|
|
}
|
|
|
|
|
2021-06-06 17:55:05 +02:00
|
|
|
#[cfg_attr(feature = "debug", derive(Debug))]
|
2021-03-15 08:19:31 +01:00
|
|
|
pub struct Range {
|
|
|
|
pub start: usize,
|
|
|
|
pub end: usize,
|
|
|
|
}
|
2021-06-06 17:55:05 +02:00
|
|
|
|
|
|
|
#[cfg_attr(feature = "debug", derive(Debug))]
|
2020-10-20 08:42:53 +02:00
|
|
|
pub struct Diagnostic {
|
2021-03-15 08:19:31 +01:00
|
|
|
pub range: Range,
|
2020-10-20 08:42:53 +02:00
|
|
|
pub line: usize,
|
|
|
|
pub message: String,
|
2021-03-11 08:31:49 +01:00
|
|
|
pub severity: Option<Severity>,
|
2020-10-20 08:42:53 +02:00
|
|
|
}
|