fix(arc): dev blocks scope (#193)

This commit is contained in:
Xenxo Espasandín 2024-02-13 16:39:45 +01:00 committed by GitHub
parent 2caaf75128
commit d2443394f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -244,7 +244,12 @@ auto compiler::emit_stmt_dev(stmt_dev const& stm) -> void
auto end = create_label(); auto end = create_label();
developer_thread_ = true; developer_thread_ = true;
emit_opcode(opcode::OP_DevblockBegin, end); emit_opcode(opcode::OP_DevblockBegin, end);
auto& paren = scopes_.back();
scopes_.push_back(scope(paren.brk, paren.cnt));
emit_stmt_list(*stm.block); emit_stmt_list(*stm.block);
scopes_.pop_back();
insert_label(end); insert_label(end);
developer_thread_ = false; developer_thread_ = false;
} }