feat(tazjin/rlox): Implement else clauses
Change-Id: I0bc2333c0b4dd3e2e584a90d0d15b28c48130f03 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3740 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
670662a360
commit
33e71ba97f
4 changed files with 22 additions and 1 deletions
|
|
@ -213,6 +213,10 @@ impl VM {
|
|||
panic!("unpatched jump detected - this is a fatal compiler error!");
|
||||
}
|
||||
|
||||
OpCode::OpJump(offset) => {
|
||||
self.ip += offset.0;
|
||||
}
|
||||
|
||||
OpCode::OpJumpIfFalse(offset) => {
|
||||
if self
|
||||
.stack
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue