mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Made open emit markers even more persistent
This commit is contained in:
parent
5763ac7d83
commit
e3b3089623
4 changed files with 36 additions and 10 deletions
|
@ -5858,10 +5858,13 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
if (entry.mParseRevision != data.mCollapseParseRevision)
|
if (entry.mParseRevision != data.mCollapseParseRevision)
|
||||||
{
|
{
|
||||||
if (mEmbeds.GetAndRemove(entry.mAnchorLine) case .Ok(let val))
|
if (mEmbeds.TryGet(entry.mAnchorLine, ?, var value))
|
||||||
{
|
{
|
||||||
//Debug.WriteLine($" Deleting(2) {val.value}");
|
if (!(value is EmitEmbed))
|
||||||
delete val.value;
|
{
|
||||||
|
mEmbeds.Remove(entry.mAnchorLine);
|
||||||
|
delete value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@entry.Remove();
|
@entry.Remove();
|
||||||
}
|
}
|
||||||
|
@ -6275,8 +6278,15 @@ namespace IDE.ui
|
||||||
|
|
||||||
if (failed)
|
if (failed)
|
||||||
{
|
{
|
||||||
if (mEmbeds.GetAndRemove(prevAnchorLine) case .Ok(let val))
|
if (mEmbeds.TryGet(prevAnchorLine, ?, var value))
|
||||||
delete val.value;
|
{
|
||||||
|
if (!(value is EmitEmbed))
|
||||||
|
{
|
||||||
|
mEmbeds.Remove(prevAnchorLine);
|
||||||
|
delete value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
entry.mDeleted = true;
|
entry.mDeleted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4843,7 +4843,7 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
||||||
typeInstance->mCeTypeInfo->mTypeIFaceMap = typeInstance->mCeTypeInfo->mNext->mTypeIFaceMap;
|
typeInstance->mCeTypeInfo->mTypeIFaceMap = typeInstance->mCeTypeInfo->mNext->mTypeIFaceMap;
|
||||||
typeInstance->mCeTypeInfo->mHash = typeInstance->mCeTypeInfo->mNext->mHash;
|
typeInstance->mCeTypeInfo->mHash = typeInstance->mCeTypeInfo->mNext->mHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete typeInstance->mCeTypeInfo->mNext;
|
delete typeInstance->mCeTypeInfo->mNext;
|
||||||
typeInstance->mCeTypeInfo->mNext = NULL;
|
typeInstance->mCeTypeInfo->mNext = NULL;
|
||||||
}
|
}
|
||||||
|
@ -4857,10 +4857,9 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
||||||
typeInstance->mCeTypeInfo->mTypeIFaceMap.Clear();
|
typeInstance->mCeTypeInfo->mTypeIFaceMap.Clear();
|
||||||
typeInstance->mCeTypeInfo->mHash = Val128();
|
typeInstance->mCeTypeInfo->mHash = Val128();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((typeInstance->mCeTypeInfo->mFailed) &&
|
if (((typeInstance->mCeTypeInfo->mFailed) || (typeInstance->mTypeDef->HasParsingFailed())) &&
|
||||||
(prevHadEmissions) &&
|
(prevHadEmissions))
|
||||||
(typeInstance->mCeTypeInfo->mEmitSourceMap.IsEmpty()))
|
|
||||||
{
|
{
|
||||||
// Just add a marker to retain the previous open emits
|
// Just add a marker to retain the previous open emits
|
||||||
typeInstance->mCeTypeInfo->mEmitSourceMap[-1] = BfCeTypeEmitSource();
|
typeInstance->mCeTypeInfo->mEmitSourceMap[-1] = BfCeTypeEmitSource();
|
||||||
|
|
|
@ -1030,6 +1030,22 @@ bool BfTypeDef::HasCustomAttributes()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BfTypeDef::HasParsingFailed()
|
||||||
|
{
|
||||||
|
auto parser = mTypeDeclaration->GetParser();
|
||||||
|
if ((parser != NULL) && (parser->mParsingFailed))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
for (auto partial : mPartials)
|
||||||
|
{
|
||||||
|
parser = partial->mTypeDeclaration->GetParser();
|
||||||
|
if ((parser != NULL) && (parser->mParsingFailed))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
BfProject::BfProject()
|
BfProject::BfProject()
|
||||||
|
|
|
@ -1219,6 +1219,7 @@ public:
|
||||||
BfFieldDef* GetFieldByName(const StringImpl& name);
|
BfFieldDef* GetFieldByName(const StringImpl& name);
|
||||||
bool HasAutoProperty(BfPropertyDeclaration* propertyDeclaration);
|
bool HasAutoProperty(BfPropertyDeclaration* propertyDeclaration);
|
||||||
bool ContainsPartial(BfTypeDef* partialTypeDef);
|
bool ContainsPartial(BfTypeDef* partialTypeDef);
|
||||||
|
bool HasParsingFailed();
|
||||||
String GetAutoPropertyName(BfPropertyDeclaration* propertyDeclaration);
|
String GetAutoPropertyName(BfPropertyDeclaration* propertyDeclaration);
|
||||||
BfAstNode* GetRefNode();
|
BfAstNode* GetRefNode();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue