Files
crafting-interpreters/rlox/src/main.rs

10 lines
245 B
Rust
Raw Normal View History

2023-03-29 20:07:31 +02:00
mod vm;
2023-03-29 20:03:16 +02:00
fn main() {
2023-03-29 20:07:31 +02:00
let mut chunk = vm::Chunk::new("TEST".to_string());
2023-03-29 21:15:41 +02:00
chunk.add_op(vm::Op::Return, 1);
chunk.add_op(vm::Op::Constant { offset: 0 }, 1);
chunk.add_constant(vm::Value::from(3.14));
2023-03-29 20:03:16 +02:00
println!("{:?}", chunk);
}