feat(tazjin/rlox): Initial bytecode representation

This is significantly simplified from the version in the book, since
I'm using Rust's Vec and not implementing dynamic arrays manually.

We'll see if I run into issues with that ...

Change-Id: Ie3446ac3884b850f3ba73a4b1a6ca14e68054188
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2413
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2021-01-17 20:33:39 +03:00 committed by tazjin
parent 30a6fcccee
commit 49c4cc6c56
4 changed files with 80 additions and 1 deletions

View file

@ -0,0 +1,8 @@
#[derive(Debug)]
pub enum OpCode {
/// Access a constant for use.
OpConstant(usize),
/// Return from the current function.
OpReturn,
}