1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Emit marker fixes - idSpan fix, persistent opening, specialized squiggle

This commit is contained in:
Brian Fiete 2022-05-26 15:39:32 -07:00
parent bbd0fe8779
commit 866bddde2e
17 changed files with 237 additions and 65 deletions

View file

@ -9919,7 +9919,7 @@ BF_EXPORT const char* BF_CALLTYPE BfCompiler_GetCollapseRegions(BfCompiler* bfCo
*valuePtr = foundTypeIds.mCount - 1;
outString += "+";
if (emitParser == NULL)
if ((emitParser == NULL) || (!emitParser->mIsEmitted))
{
String typeName;
outString += typeInst->mTypeDef->mProject->mName;
@ -9989,7 +9989,8 @@ BF_EXPORT const char* BF_CALLTYPE BfCompiler_GetCollapseRegions(BfCompiler* bfCo
int startLine = 0;
int startLineChar = 0;
emitParser->GetLineCharAtIdx(kv.mValue.mSrcStart, startLine, startLineChar);
if (kv.mValue.mSrcStart >= 0)
emitParser->GetLineCharAtIdx(kv.mValue.mSrcStart, startLine, startLineChar);
int srcEnd = kv.mValue.mSrcEnd - 1;
while (srcEnd >= kv.mValue.mSrcStart)
@ -10006,8 +10007,9 @@ BF_EXPORT const char* BF_CALLTYPE BfCompiler_GetCollapseRegions(BfCompiler* bfCo
int endLine = 0;
int endLineChar = 0;
emitParser->GetLineCharAtIdx(srcEnd, endLine, endLineChar);
outString += StrFormat("e%d,%d,%d,%d\n", embedId, charIdx, startLine, endLine + 1);
if (srcEnd >= 0)
emitParser->GetLineCharAtIdx(srcEnd, endLine, endLineChar);
outString += StrFormat("e%d,%d,%d,%d,%d\n", embedId, charIdx, startLine, endLine + 1, typeInst->mTypeDef->mTypeDeclaration->GetParser()->mTextVersion);
}
}
@ -10036,7 +10038,7 @@ BF_EXPORT const char* BF_CALLTYPE BfCompiler_GetCollapseRegions(BfCompiler* bfCo
if (embedId == -1)
continue;
outString += StrFormat("e%d,%d,%d,%d\n", embedId, kv.mKey, 0, 0);
outString += StrFormat("e%d,%d,%d,%d,%d\n", embedId, kv.mKey, 0, 0, -1);
}
}
};