fix a bug

This commit is contained in:
blueloveTH 2025-05-19 14:11:48 +08:00
parent e473fe7f05
commit fac83607f0

View File

@ -2058,8 +2058,6 @@ static Error* compile_match_case(Compiler* self, c11_vector* patches) {
Ctx__patch_jump(ctx(), patch); Ctx__patch_jump(ctx(), patch);
} else { } else {
check(compile_block_body(self)); check(compile_block_body(self));
int break_patch = Ctx__emit_(ctx(), OP_JUMP_FORWARD, BC_NOARG, prev()->line);
c11_vector__push(int, patches, break_patch);
} }
} else { } else {
return SyntaxError(self, "expected 'case', got '%s'", TokenSymbols[curr()->type]); return SyntaxError(self, "expected 'case', got '%s'", TokenSymbols[curr()->type]);