1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Labeled switch break fix

This commit is contained in:
Brian Fiete 2020-09-06 11:10:04 -07:00
parent 27e2ed1598
commit 4c69cb6f62

View file

@ -4083,9 +4083,7 @@ void BfModule::Visit(BfSwitchStatement* switchStmt)
outerScope.mInnerIsConditional = false;
outerScope.mCloseNode = switchStmt;
if (switchStmt->mCloseBrace != NULL)
outerScope.mCloseNode = switchStmt->mCloseBrace;
if (switchStmt->mLabelNode != NULL)
outerScope.mLabelNode = switchStmt->mLabelNode->mLabel;
outerScope.mCloseNode = switchStmt->mCloseBrace;
mCurMethodState->AddScope(&outerScope);
NewScopeState();
@ -4128,7 +4126,9 @@ void BfModule::Visit(BfSwitchStatement* switchStmt)
newScope.mInnerIsConditional = true;
newScope.mCloseNode = switchStmt;
if (switchStmt->mCloseBrace != NULL)
newScope.mCloseNode = switchStmt->mCloseBrace;
newScope.mCloseNode = switchStmt->mCloseBrace;
if (switchStmt->mLabelNode != NULL)
newScope.mLabelNode = switchStmt->mLabelNode->mLabel;
mCurMethodState->AddScope(&newScope);
NewScopeState();