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) }