From 2ba34701ac54f4fddb00c3c9614fb6a5faa301fb Mon Sep 17 00:00:00 2001 From: John Doty Date: Sun, 24 Mar 2024 07:48:23 -0700 Subject: [PATCH] [fine] Note about panics and error messages --- fine/src/compiler.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fine/src/compiler.rs b/fine/src/compiler.rs index c72a4f53..8fd1d3a8 100644 --- a/fine/src/compiler.rs +++ b/fine/src/compiler.rs @@ -177,6 +177,13 @@ impl<'a> Compiler<'a> { where T: Into, { + // TODO: We should be looking for semantic errors and using *those* + // as the panic description and only fall back to the provided + // description if we can't find a semantic error. The idea is + // that if the compiler got confused it *might* be because + // there was actually a semantic error in the program and that + // semantic error might be a better description of what is + // wrong. let index = self.add_string(description.into()); Instruction::Panic(index) }