[rlox] Add trace to repl

This commit is contained in:
ctsk
2023-10-09 11:44:37 +02:00
parent f617738674
commit 8ea397881c
2 changed files with 7 additions and 0 deletions

View File

@@ -23,6 +23,10 @@ impl VM {
}
}
pub fn set_trace(&mut self, trace: bool) {
self.trace = trace;
}
fn runtime_err(&self, msg: &'static str) -> VMError {
VMError::Runtime(msg.into(), self.pc)
}