also put the new panic mod under version control
This commit is contained in:
parent
0d8b42662b
commit
050a0f987d
19
src/panic.rs
Normal file
19
src/panic.rs
Normal 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>,
|
||||
}
|
Loading…
Reference in New Issue
Block a user