From 50f9bfa4c68ccbec821d6af35734555a3a6b8fa2 Mon Sep 17 00:00:00 2001 From: Alex Bethel Date: Fri, 16 Jul 2021 19:03:27 -0500 Subject: [PATCH] Eliminate type errors Hooray, we've just made a whole class of errors impossible! :D --- src/error.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/error.rs b/src/error.rs index ea31434a..35a62a37 100644 --- a/src/error.rs +++ b/src/error.rs @@ -16,7 +16,6 @@ pub enum ErrorKind { InvalidIdentifier, UnknownVariable(String), MeloVariable(String), - TypeError(String), TopLevelBreak, BfInterpretError(InterpretError), MismatchedArgumentError, @@ -56,7 +55,6 @@ impl Display for ErrorKind { ErrorKind::InvalidIdentifier => write!(f, "invalid identifier"), ErrorKind::UnknownVariable(name) => write!(f, "unknown identifier \"{}\"", name), ErrorKind::MeloVariable(name) => write!(f, "banned variable \"{}\"", name), - ErrorKind::TypeError(desc) => write!(f, "type error: {}", desc), ErrorKind::TopLevelBreak => write!(f, "can only `break` out of a loop"), ErrorKind::BfInterpretError(err) => write!(f, "brainfuck error: {}", err), // TODO: give concrete numbers here.