also put the new panic mod under version control

This commit is contained in:
Scott Richmond 2025-07-04 01:23:31 -04:00
parent 0d8b42662b
commit 050a0f987d

19
src/panic.rs Normal file
View File

@ -0,0 +1,19 @@
use crate::value::Value;
use crate::vm::CallFrame;
#[derive(Debug, Clone, PartialEq)]
pub enum PanicMsg {
NoLetMatch,
NoFnMatch,
NoMatch,
Generic(String),
}
#[derive(Debug, Clone, PartialEq)]
pub struct Panic {
pub msg: PanicMsg,
pub frame: CallFrame,
pub scrutinee: Option<Value>,
pub ip: usize,
pub call_stack: Vec<CallFrame>,
}