From 062048ef6e3e060bcf841ea2ec92e026f09d8da0 Mon Sep 17 00:00:00 2001 From: eichlan Date: Tue, 23 Jun 2026 15:31:51 -0700 Subject: Roorganized into workspace and packages. This is to accomidate a new proc_macro package, which can't have anything else in it. --- src/error.rs | 59 ----------------------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 src/error.rs (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs deleted file mode 100644 index bbb5d6f..0000000 --- a/src/error.rs +++ /dev/null @@ -1,59 +0,0 @@ - -use core::error::Error; -use std::fmt; - -use crate::position::*; - -#[derive(Debug)] -pub struct CrimError { - position: Position, - what: String, -} - -impl CrimError { - pub fn parse( position: Position, what: String ) -> Self { - Self { - position, - what, - } - } - - pub fn other(what: String) -> Self { - Self { - position: Position::none(), - what, - } - } - - pub fn broken( position: Position, what: &str ) -> Self { - Self { - position, - what: format!("Broken parser? {}", what), - } - } - - pub fn eos( context: &str ) -> Self { - Self { - position: Position::none(), - what: format!("Premature end of stream while looking for {}", context), - } - } - - pub fn what(&self) -> &str { - &self.what - } - - pub fn start(&self) -> &Position { - &self.position - } -} - -impl fmt::Display for CrimError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "Error parsing input: {}", "yeah") - } -} - -impl Error for CrimError { } - -pub type CrimResult = Result; -- cgit v1.2.3