1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Properly colorize type declarations

This commit is contained in:
Brian Fiete 2020-08-23 06:45:14 -07:00
parent c5f610bae2
commit 8868d3216e
2 changed files with 29 additions and 1 deletions

View file

@ -3946,7 +3946,14 @@ void BfCompiler::ProcessAutocompleteTempType()
if ((typeInst->mModule != NULL) && (!typeInst->mModule->mIsScratchModule))
mLastAutocompleteModule = typeInst->mModule;
#endif
BfSourceElementType elemType = BfSourceElementType_Type;
if (typeInst->IsInterface())
elemType = BfSourceElementType_Interface;
else if (typeInst->IsObject())
elemType = BfSourceElementType_RefType;
mResolvePassData->mSourceClassifier->SetElementType(tempTypeDef->mTypeDeclaration->mNameNode, elemType);
SetAndRestoreValue<BfTypeInstance*> prevType(module->mCurTypeInstance, typeInst);
typeState.mTypeInstance = typeInst;