lib_ruby_parser/error/level.rs
1/// Error level of the diagnostic message
2#[repr(C)]
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub enum ErrorLevel {
5 /// Warning level
6 Warning,
7 /// Error level
8 Error,
9}
10
11impl ToString for ErrorLevel {
12 fn to_string(&self) -> String {
13 match self {
14 Self::Warning => "warning",
15 Self::Error => "error",
16 }
17 .to_string()
18 }
19}