mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Added ability to put Main method in an anonymous static section
This commit is contained in:
parent
9a7bb95107
commit
125f7b85a7
3 changed files with 20 additions and 9 deletions
|
@ -2222,7 +2222,7 @@ bool BfSystem::CheckTypeDefReference(BfTypeDef* typeDef, BfProject* project)
|
|||
return project->ContainsReference(typeDef->mProject);
|
||||
}
|
||||
|
||||
BfTypeDef* BfSystem::FindTypeDef(const BfAtomComposite& findName, int numGenericArgs, BfProject* project, const Array<BfAtomComposite>& namespaceSearch, BfTypeDef** ambiguousTypeDef)
|
||||
BfTypeDef* BfSystem::FindTypeDef(const BfAtomComposite& findName, int numGenericArgs, BfProject* project, const Array<BfAtomComposite>& namespaceSearch, BfTypeDef** ambiguousTypeDef, BfFindTypeDefFlags flags)
|
||||
{
|
||||
if (findName.GetPartsCount() == 1)
|
||||
{
|
||||
|
@ -2254,7 +2254,8 @@ BfTypeDef* BfSystem::FindTypeDef(const BfAtomComposite& findName, int numGeneric
|
|||
{
|
||||
BfTypeDef* typeDef = *itr;
|
||||
|
||||
if ((typeDef->mIsPartial) || (typeDef->IsGlobalsContainer()))
|
||||
if ((typeDef->mIsPartial) ||
|
||||
((typeDef->IsGlobalsContainer()) && ((flags & BfFindTypeDefFlag_AllowGlobal) == 0)))
|
||||
{
|
||||
itr.MoveToNextHashMatch();
|
||||
continue;
|
||||
|
@ -2368,7 +2369,7 @@ bool BfSystem::FindTypeDef(const BfAtomComposite& findName, int numGenericArgs,
|
|||
return hadMatch;
|
||||
}
|
||||
|
||||
BfTypeDef* BfSystem::FindTypeDef(const StringImpl& typeName, int numGenericArgs, BfProject* project, const Array<BfAtomComposite>& namespaceSearch, BfTypeDef** ambiguousTypeDef)
|
||||
BfTypeDef* BfSystem::FindTypeDef(const StringImpl& typeName, int numGenericArgs, BfProject* project, const Array<BfAtomComposite>& namespaceSearch, BfTypeDef** ambiguousTypeDef, BfFindTypeDefFlags flags)
|
||||
{
|
||||
BfAtomComposite qualifiedFindName;
|
||||
BfAtom* tempData[16];
|
||||
|
@ -2377,7 +2378,7 @@ BfTypeDef* BfSystem::FindTypeDef(const StringImpl& typeName, int numGenericArgs,
|
|||
|
||||
BfTypeDef* result = NULL;
|
||||
if (ParseAtomComposite(typeName, qualifiedFindName))
|
||||
result = FindTypeDef(qualifiedFindName, numGenericArgs, project, namespaceSearch, ambiguousTypeDef);
|
||||
result = FindTypeDef(qualifiedFindName, numGenericArgs, project, namespaceSearch, ambiguousTypeDef, flags);
|
||||
if (qualifiedFindName.mParts == tempData)
|
||||
qualifiedFindName.mParts = NULL;
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue