diff options
author | Vincent Ambo <mail@tazj.in> | 2021-01-17T20·03+0300 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-01-17T21·17+0000 |
commit | 7fb93fb49008491184a7d55ccd43db846452dce0 (patch) | |
tree | e07383f72d95ee2cfc150811a99af7caef87bb55 /users/tazjin/rlox/src/bytecode/mod.rs | |
parent | b1d0e22b1f5fe907ba3d48931e5a38b9a75b0dcf (diff) |
feat(tazjin/rlox): Bootstrap VM for Lox bytecode r/2127
Change-Id: I479e20bf2087e5c4aa20e31b364c57ed0d961bcf Reviewed-on: https://cl.tvl.fyi/c/depot/+/2416 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'users/tazjin/rlox/src/bytecode/mod.rs')
-rw-r--r-- | users/tazjin/rlox/src/bytecode/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/users/tazjin/rlox/src/bytecode/mod.rs b/users/tazjin/rlox/src/bytecode/mod.rs index 922b3bef4484..de04d7b06f4d 100644 --- a/users/tazjin/rlox/src/bytecode/mod.rs +++ b/users/tazjin/rlox/src/bytecode/mod.rs @@ -3,8 +3,10 @@ //! https://craftinginterpreters.com/chunks-of-bytecode.html mod chunk; +mod errors; mod opcode; mod value; +mod vm; use chunk::Chunk; use opcode::OpCode; @@ -16,5 +18,5 @@ pub fn main() { chunk.add_op(OpCode::OpConstant(constant), 1); chunk.add_op(OpCode::OpReturn, 1); - chunk::disassemble(&chunk, "test chunk"); + vm::interpret(chunk).expect("it should work"); } |