improve bytecode readability by reporting patterns
This commit is contained in:
parent
f58a5f14b5
commit
0b27944d11
24
src/main.rs
24
src/main.rs
|
@ -134,20 +134,20 @@ pub fn run(src: &'static str) {
|
||||||
println!("\n\n")
|
println!("\n\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
// if DEBUG_SCRIPT_RUN {
|
if DEBUG_SCRIPT_RUN {
|
||||||
// println!("=== vm run: test ===");
|
println!("=== vm run: test ===");
|
||||||
// }
|
}
|
||||||
|
|
||||||
// let vm_chunk = compiler.chunk;
|
let vm_chunk = compiler.chunk;
|
||||||
|
|
||||||
// let mut vm = Vm::new(vm_chunk, DEBUG_SCRIPT_RUN);
|
let mut vm = Vm::new(vm_chunk, DEBUG_SCRIPT_RUN);
|
||||||
// let result = vm.run();
|
let result = vm.run();
|
||||||
// let output = match result {
|
let output = match result {
|
||||||
// Ok(val) => val.show(),
|
Ok(val) => val.show(),
|
||||||
// Err(panic) => format!("Ludus panicked! {panic}"),
|
Err(panic) => format!("Ludus panicked! {panic}"),
|
||||||
// };
|
};
|
||||||
// vm.print_stack();
|
vm.print_stack();
|
||||||
// println!("{output}");
|
println!("{output}");
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn ld_fmt(src: &'static str) -> Result<String, String> {
|
pub fn ld_fmt(src: &'static str) -> Result<String, String> {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user