Add set_catch, unset_catch instructions

This commit is contained in:
Andrew Morris
2023-03-23 09:35:33 +11:00
parent 56f6ce5922
commit 337c5c5296
11 changed files with 50 additions and 14 deletions

View File

@@ -47,6 +47,8 @@ pub enum InstructionByte {
Throw = 0x2c,
Import = 0x2d,
ImportStar = 0x2e,
SetCatch = 0x2f,
UnsetCatch = 0x30,
}
impl InstructionByte {
@@ -101,6 +103,8 @@ impl InstructionByte {
0x2c => Throw,
0x2d => Import,
0x2e => ImportStar,
0x2f => SetCatch,
0x30 => UnsetCatch,
_ => panic!("Unrecognized instruction: {}", byte),
};