mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed foreach labeled break
This commit is contained in:
parent
85462e6d62
commit
b204dbf8c0
1 changed files with 3 additions and 3 deletions
|
@ -5901,9 +5901,7 @@ void BfModule::Visit(BfForEachStatement* forEachStmt)
|
|||
UpdateSrcPos(forEachStmt);
|
||||
|
||||
BfScopeData scopeData;
|
||||
// We set mIsLoop after the non-looped initializations
|
||||
if (forEachStmt->mLabelNode != NULL)
|
||||
scopeData.mLabelNode = forEachStmt->mLabelNode->mLabel;
|
||||
// We set mIsLoop after the non-looped initializations
|
||||
scopeData.mValueScopeStart = ValueScopeStart();
|
||||
mCurMethodState->AddScope(&scopeData);
|
||||
NewScopeState();
|
||||
|
@ -6425,6 +6423,8 @@ void BfModule::Visit(BfForEachStatement* forEachStmt)
|
|||
}
|
||||
|
||||
BfScopeData innerScopeData;
|
||||
if (forEachStmt->mLabelNode != NULL)
|
||||
innerScopeData.mLabelNode = forEachStmt->mLabelNode->mLabel;
|
||||
innerScopeData.mValueScopeStart = ValueScopeStart();
|
||||
mCurMethodState->AddScope(&innerScopeData);
|
||||
NewScopeState(true, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue