mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22: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 outerTypeDef = mCurTypeDef;
|
||||||
auto actualOuterTypeDef = mCurActualTypeDef;
|
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->mSystem = mSystem;
|
||||||
mCurTypeDef->mProject = mCurSource->mProject;
|
mCurTypeDef->mProject = mCurSource->mProject;
|
||||||
mCurTypeDef->mNamespace = mNamespace;
|
mCurTypeDef->mNamespace = mNamespace;
|
||||||
|
@ -1672,9 +1679,6 @@ void BfDefBuilder::Visit(BfTypeDeclaration* typeDeclaration)
|
||||||
{
|
{
|
||||||
mCurTypeDef->mName->mAtomUpdateIdx = ++mSystem->mAtomUpdateIdx;
|
mCurTypeDef->mName->mAtomUpdateIdx = ++mSystem->mAtomUpdateIdx;
|
||||||
}
|
}
|
||||||
|
|
||||||
mCurTypeDef = outerTypeDef;
|
|
||||||
mCurActualTypeDef = actualOuterTypeDef;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BfDefBuilder::FinishTypeDef(bool wantsToString)
|
void BfDefBuilder::FinishTypeDef(bool wantsToString)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue