mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-17 23:56:05 +02:00
Emit marker fixes - idSpan fix, persistent opening, specialized squiggle
This commit is contained in:
parent
bbd0fe8779
commit
866bddde2e
17 changed files with 237 additions and 65 deletions
|
@ -555,9 +555,9 @@ namespace IDE.Compiler
|
|||
|
||||
var bfParser = mBfSystem.CreateParser(projectSourceCommand.mProjectSource);
|
||||
if (data != null)
|
||||
bfParser.SetSource(data, sourceFilePath);
|
||||
bfParser.SetSource(data, sourceFilePath, -1);
|
||||
else
|
||||
bfParser.SetSource("", sourceFilePath);
|
||||
bfParser.SetSource("", sourceFilePath, -1);
|
||||
bfParser.SetCharIdData(ref char8IdData);
|
||||
|
||||
if (hash case .MD5(let md5Hash))
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace IDE.Compiler
|
|||
static extern void BfSystem_DeleteParser(void* bfSystem, void* bfParser);
|
||||
|
||||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern void BfParser_SetSource(void* bfParser, char8* data, int32 length, char8* fileName);
|
||||
static extern void BfParser_SetSource(void* bfParser, char8* data, int32 length, char8* fileName, int32 textVersion);
|
||||
|
||||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern void BfParser_SetCharIdData(void* bfParser, uint8* data, int32 length);
|
||||
|
@ -197,11 +197,11 @@ namespace IDE.Compiler
|
|||
mNativeBfParser = null;
|
||||
}
|
||||
|
||||
public void SetSource(StringView data, String fileName)
|
||||
public void SetSource(StringView data, String fileName, int textVersion)
|
||||
{
|
||||
Debug.Assert(!mIsUsed);
|
||||
mIsUsed = true;
|
||||
BfParser_SetSource(mNativeBfParser, data.Ptr, (int32)data.Length, fileName);
|
||||
BfParser_SetSource(mNativeBfParser, data.Ptr, (int32)data.Length, fileName, (.)textVersion);
|
||||
}
|
||||
|
||||
public void SetCharIdData(ref IdSpan char8IdData)
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace IDE.Compiler
|
|||
|
||||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern char8* BfPassInstance_GetErrorData(void* mNativeResolvePassData, int32 errorIdx, out int32 code, out bool isWarning,
|
||||
out bool isAfter, out bool isDeferred, out bool isWhileSpecializing, out bool isPersistent, out char8* projectName,
|
||||
out bool isAfter, out bool isDeferred, out int8 isWhileSpecializing, out bool isPersistent, out char8* projectName,
|
||||
out char8* fileName, out int32 srcStart, out int32 srcEnd, int32* srcLine, int32* srcColumn, out int32 moreInfoCount);
|
||||
|
||||
[CallingConvention(.Stdcall), CLink]
|
||||
|
@ -42,11 +42,18 @@ namespace IDE.Compiler
|
|||
|
||||
public class BfError
|
||||
{
|
||||
public enum SpecializingKind
|
||||
{
|
||||
None,
|
||||
Type,
|
||||
Method
|
||||
}
|
||||
|
||||
public bool mIsWarning;
|
||||
public int32 mCode;
|
||||
public bool mIsAfter;
|
||||
public bool mIsDeferred;
|
||||
public bool mIsWhileSpecializing;
|
||||
public SpecializingKind mWhileSpecializing;
|
||||
public bool mIsPersistent;
|
||||
public String mProject ~ delete _;
|
||||
public String mError ~ delete _;
|
||||
|
@ -127,7 +134,7 @@ namespace IDE.Compiler
|
|||
char8* projectName = null;
|
||||
char8* fileName = null;
|
||||
bfError.mError = new String(BfPassInstance_GetErrorData(mNativeBfPassInstance, errorIdx, out bfError.mCode, out bfError.mIsWarning, out bfError.mIsAfter, out bfError.mIsDeferred,
|
||||
out bfError.mIsWhileSpecializing, out bfError.mIsPersistent, out projectName, out fileName, out bfError.mSrcStart, out bfError.mSrcEnd,
|
||||
out *(int8*)&bfError.mWhileSpecializing, out bfError.mIsPersistent, out projectName, out fileName, out bfError.mSrcStart, out bfError.mSrcEnd,
|
||||
getLine ? &bfError.mLine : null, getLine ? &bfError.mColumn : null,
|
||||
out bfError.mMoreInfoCount));
|
||||
if (projectName != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue