mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Fixed enum result classify issue
This commit is contained in:
parent
4b1d7047d1
commit
6a158db9da
4 changed files with 11 additions and 5 deletions
|
@ -5312,6 +5312,13 @@ bool BfCompiler::IsDataResolvePass()
|
|||
return (mResolvePassData != NULL) && (mResolvePassData->mResolveType == BfResolveType_GetResultString);
|
||||
}
|
||||
|
||||
bool BfCompiler::WantsClassifyNode(BfAstNode* node)
|
||||
{
|
||||
return ((mResolvePassData != NULL) &&
|
||||
(node->IsFromParser(mResolvePassData->mParser)) &&
|
||||
(mResolvePassData->mSourceClassifier != NULL));
|
||||
}
|
||||
|
||||
BfAutoComplete* BfCompiler::GetAutoComplete()
|
||||
{
|
||||
if (mResolvePassData != NULL)
|
||||
|
|
|
@ -485,6 +485,7 @@ public:
|
|||
int GetDynCastVDataCount();
|
||||
bool IsAutocomplete();
|
||||
bool IsDataResolvePass();
|
||||
bool WantsClassifyNode(BfAstNode* node);
|
||||
BfAutoComplete* GetAutoComplete();
|
||||
bool IsHotCompile();
|
||||
bool IsSkippingExtraResolveChecks();
|
||||
|
|
|
@ -8560,9 +8560,7 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
|
|||
|
||||
if (enumResult)
|
||||
{
|
||||
if ((mModule->mCompiler->mResolvePassData != NULL) &&
|
||||
(targetSrc->IsFromParser(mModule->mCompiler->mResolvePassData->mParser)) &&
|
||||
(mModule->mCompiler->mResolvePassData->mSourceClassifier != NULL))
|
||||
if (mModule->mCompiler->WantsClassifyNode(targetSrc))
|
||||
{
|
||||
mModule->mCompiler->mResolvePassData->mSourceClassifier->SetElementType(targetSrc, BfSourceElementType_Normal);
|
||||
}
|
||||
|
|
|
@ -2810,7 +2810,7 @@ void BfModule::SetElementType(BfAstNode* astNode, BfSourceElementType elementTyp
|
|||
{
|
||||
if ((mCompiler->mResolvePassData != NULL) &&
|
||||
(mCompiler->mResolvePassData->mSourceClassifier != NULL) &&
|
||||
(astNode->IsFromParser( mCompiler->mResolvePassData->mParser)))
|
||||
(astNode->IsFromParser(mCompiler->mResolvePassData->mParser)))
|
||||
{
|
||||
mCompiler->mResolvePassData->mSourceClassifier->SetElementType(astNode, elementType);
|
||||
}
|
||||
|
@ -16280,7 +16280,7 @@ void BfModule::EmitDtorBody()
|
|||
|
||||
while (fieldDtor != NULL)
|
||||
{
|
||||
if ((mCompiler->mResolvePassData != NULL) && (mCompiler->mResolvePassData->mSourceClassifier != NULL))
|
||||
if (mCompiler->WantsClassifyNode(fieldDtor))
|
||||
{
|
||||
mCompiler->mResolvePassData->mSourceClassifier->SetElementType(fieldDtor, BfSourceElementType_Normal);
|
||||
mCompiler->mResolvePassData->mSourceClassifier->VisitChild(fieldDtor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue