From 470bab96b72ebf5a2cd3f3a76b493498feba81b8 Mon Sep 17 00:00:00 2001 From: Anton Eliasson Date: Tue, 11 Feb 2025 15:41:54 +0100 Subject: [PATCH] Add warning as valid log statement type --- CHANGELOG.md | 3 +++ src/analysis/structure/statements.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cae15c5..fc28e41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ --> # Change Log +## 0.9.9 +- Added "warning" as a valid log statement type. + ## 0.9.8 - Correct behavior of DFA "-t" flag diff --git a/src/analysis/structure/statements.rs b/src/analysis/structure/statements.rs index 25b8bb4..2ee896f 100644 --- a/src/analysis/structure/statements.rs +++ b/src/analysis/structure/statements.rs @@ -553,6 +553,7 @@ pub enum LogKind { Critical, Unimpl, Error, + Warning, } #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -576,6 +577,7 @@ impl Log { kindtok.read_token(file.file))).and_then( |(range, id)|match id.as_str() { "error" => Some(LogKind::Error), + "warning" => Some(LogKind::Warning), "info" => Some(LogKind::Info), "unimpl" => Some(LogKind::Unimpl), "critical" => Some(LogKind::Critical), @@ -584,7 +586,7 @@ impl Log { report.push(LocalDMLError { range, description: "Invalid log kind, valid log kinds are \ - \"error\", \"info\", \"unimpl\", \ + \"error\", \"warning\", \"info\", \"unimpl\", \ \"critical\", and \"spec_viol\"." .to_string(), });