20 lines
369 B
Rust
20 lines
369 B
Rust
|
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>,
|
||
|
}
|