feat(tazjin/rlox): Track source lines along with bytecode
Change-Id: I272e73b9b1c9571fbfe4fa983fb4283ddee02bd4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2414 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
This commit is contained in:
parent
49c4cc6c56
commit
c26915d012
2 changed files with 40 additions and 3 deletions
|
@ -13,8 +13,8 @@ pub fn main() {
|
|||
let mut chunk: Chunk = Default::default();
|
||||
|
||||
let constant = chunk.add_constant(1.2);
|
||||
chunk.add_op(OpCode::OpConstant(constant));
|
||||
chunk.add_op(OpCode::OpReturn);
|
||||
chunk.add_op(OpCode::OpConstant(constant), 1);
|
||||
chunk.add_op(OpCode::OpReturn, 1);
|
||||
|
||||
chunk::disassemble(&chunk, "test chunk");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue