mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Allowed type declarations in anonymous static sections
This commit is contained in:
parent
a29f22d227
commit
3378293ea9
1 changed files with 10 additions and 6 deletions
|
@ -1230,8 +1230,15 @@ void BfDefBuilder::Visit(BfTypeDeclaration* typeDeclaration)
|
|||
|
||||
auto outerTypeDef = mCurTypeDef;
|
||||
auto actualOuterTypeDef = mCurActualTypeDef;
|
||||
mCurTypeDef = new BfTypeDef();
|
||||
mCurActualTypeDef = mCurTypeDef;
|
||||
|
||||
while ((outerTypeDef != NULL) && (outerTypeDef->IsGlobalsContainer()))
|
||||
outerTypeDef = outerTypeDef->mOuterType;
|
||||
while ((actualOuterTypeDef != NULL) && (actualOuterTypeDef->IsGlobalsContainer()))
|
||||
actualOuterTypeDef = actualOuterTypeDef->mOuterType;
|
||||
|
||||
SetAndRestoreValue<BfTypeDef*> prevTypeDef(mCurTypeDef, new BfTypeDef());
|
||||
SetAndRestoreValue<BfTypeDef*> prevActualTypeDef(mCurActualTypeDef, mCurTypeDef);
|
||||
|
||||
mCurTypeDef->mSystem = mSystem;
|
||||
mCurTypeDef->mProject = mCurSource->mProject;
|
||||
mCurTypeDef->mNamespace = mNamespace;
|
||||
|
@ -1671,10 +1678,7 @@ void BfDefBuilder::Visit(BfTypeDeclaration* typeDeclaration)
|
|||
if ((prevRevisionTypeDef == NULL) && (!isAutoCompleteTempType))
|
||||
{
|
||||
mCurTypeDef->mName->mAtomUpdateIdx = ++mSystem->mAtomUpdateIdx;
|
||||
}
|
||||
|
||||
mCurTypeDef = outerTypeDef;
|
||||
mCurActualTypeDef = actualOuterTypeDef;
|
||||
}
|
||||
}
|
||||
|
||||
void BfDefBuilder::FinishTypeDef(bool wantsToString)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue