From 9083d5843f5a39fafacde81242b817021f9cb818 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 11 Jun 2026 15:20:49 -0700 Subject: Halfway there. About half the code is going away. I'm learning better how to take advantage of features of rust to simplify the code a lot. It's actually really cool. --- src/error.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index a2349ee..bbb5d6f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -25,6 +25,13 @@ impl CrimError { } } + 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(), -- cgit v1.2.3