summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2026-06-11 15:20:49 -0700
committerMike Buland <mike@xagasoft.com>2026-06-11 15:20:49 -0700
commit9083d5843f5a39fafacde81242b817021f9cb818 (patch)
treee65371f368f151a30e10631149fdd970de615e60 /src/error.rs
parentc9889f7c6622def3b6badde2738c3e912b48144f (diff)
downloadcrimtag-9083d5843f5a39fafacde81242b817021f9cb818.tar.gz
crimtag-9083d5843f5a39fafacde81242b817021f9cb818.tar.bz2
crimtag-9083d5843f5a39fafacde81242b817021f9cb818.tar.xz
crimtag-9083d5843f5a39fafacde81242b817021f9cb818.zip
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.
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs7
1 files changed, 7 insertions, 0 deletions
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 {
25 } 25 }
26 } 26 }
27 27
28 pub fn broken( position: Position, what: &str ) -> Self {
29 Self {
30 position,
31 what: format!("Broken parser? {}", what),
32 }
33 }
34
28 pub fn eos( context: &str ) -> Self { 35 pub fn eos( context: &str ) -> Self {
29 Self { 36 Self {
30 position: Position::none(), 37 position: Position::none(),