From 0f6e6d0b2f6887e025a08a862b55288f871e62ca Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 9 Jan 2025 16:06:34 +0100 Subject: Remove ContextErrorReason as it was unused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- lib/xixanta/src/assembler.rs | 11 +---------- lib/xixanta/src/errors.rs | 13 ------------- 2 files changed, 1 insertion(+), 23 deletions(-) (limited to 'lib/xixanta/src') diff --git a/lib/xixanta/src/assembler.rs b/lib/xixanta/src/assembler.rs index d82be73..e472323 100644 --- a/lib/xixanta/src/assembler.rs +++ b/lib/xixanta/src/assembler.rs @@ -1,4 +1,4 @@ -use crate::errors::{ContextError, ContextErrorReason, Error, EvalError}; +use crate::errors::{ContextError, Error, EvalError}; use crate::mapping::{get_mapping_configuration, Mapping}; use crate::node::{ControlType, NodeType, OperationType, PNode}; use crate::object::{Bundle, Context, Object, ObjectType}; @@ -231,7 +231,6 @@ impl<'a> Assembler<'a> { line: node.value.line, global: false, source: self.source_for(node), - reason: ContextErrorReason::BadScope, }); } @@ -295,7 +294,6 @@ impl<'a> Assembler<'a> { line: node.value.line, global: false, source: self.source_for(node), - reason: ContextErrorReason::BadScope, })); } } @@ -309,7 +307,6 @@ impl<'a> Assembler<'a> { line: node.value.line, global: false, source: self.source_for(node), - reason: ContextErrorReason::BadScope, })); continue; } @@ -344,7 +341,6 @@ impl<'a> Assembler<'a> { line: node.value.line, global: false, source: self.source_for(node), - reason: ContextErrorReason::BadStart, })); continue; } @@ -369,7 +365,6 @@ impl<'a> Assembler<'a> { line: node.value.line, source: self.source_for(node), global: false, - reason: ContextErrorReason::BadStart, })); continue; } @@ -393,7 +388,6 @@ impl<'a> Assembler<'a> { line: node.value.line, global: false, source: self.source_for(node), - reason: ContextErrorReason::BadScope, })); } @@ -444,7 +438,6 @@ impl<'a> Assembler<'a> { line: node.value.line, global: false, source: self.source_for(node), - reason: ContextErrorReason::BadScope, }); } } @@ -483,7 +476,6 @@ impl<'a> Assembler<'a> { line: node.value.line, global: false, source: self.source_for(node), - reason: ContextErrorReason::BadScope, })); } @@ -716,7 +708,6 @@ impl<'a> Assembler<'a> { message, source: self.source_for(node), global: false, - reason: ContextErrorReason::BadScope, })]); } } diff --git a/lib/xixanta/src/errors.rs b/lib/xixanta/src/errors.rs index 3ca00bc..544b9b4 100644 --- a/lib/xixanta/src/errors.rs +++ b/lib/xixanta/src/errors.rs @@ -67,22 +67,9 @@ impl fmt::Display for ParseError { } } -#[derive(Debug, Clone, PartialEq)] -pub enum ContextErrorReason { - Redefinition, - UnknownVariable, - BadScope, - Label, - Bounds, - BadStart, - BadEnd, - Other, -} - #[derive(Debug, Clone, PartialEq)] pub struct ContextError { pub line: usize, - pub reason: ContextErrorReason, pub message: String, pub global: bool, pub source: SourceInfo, -- cgit v1.2.3