also put the new panic mod under version control

Former-commit-id: 050a0f987d
This commit is contained in:
Scott Richmond 2025-07-04 01:23:31 -04:00
parent 53e295ac37
commit e2461590b6

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