mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 15:26:00 +02:00
CTFE updates, including heap support
This commit is contained in:
parent
792d92d014
commit
6bb363fb4b
29 changed files with 3050 additions and 595 deletions
|
@ -141,7 +141,7 @@ namespace IDE.Compiler
|
|||
{
|
||||
char8* fileName = null;
|
||||
char8* errorStr = BfPassInstance_Error_GetMoreInfoData(mNativeBfPassInstance, errorIdx, moreInfoIdx, out fileName, out bfError.mSrcStart, out bfError.mSrcEnd,
|
||||
getLine ? &bfError.mLine : null, getLine ? &bfError.mColumn : null);
|
||||
&bfError.mLine, &bfError.mColumn);
|
||||
Debug.Assert(bfError.mFilePath == null);
|
||||
if (fileName != null)
|
||||
bfError.mFilePath = new String(fileName);
|
||||
|
|
|
@ -1054,13 +1054,25 @@ namespace IDE
|
|||
if (var sourceViewPanel = GetActiveSourceViewPanel(true))
|
||||
sourceViewPanel.RecordHistoryLocation();
|
||||
|
||||
int32 charIdx = int32.Parse(cmds[2]).GetValueOrDefault();
|
||||
StringView loc = cmds[2];
|
||||
int32 charIdx = int32.Parse(loc).GetValueOrDefault();
|
||||
if (charIdx < 0)
|
||||
return;
|
||||
var sourceViewPanel = ShowSourceFile(cmds[1], null, SourceShowType.Temp);
|
||||
if (sourceViewPanel == null)
|
||||
return;
|
||||
var editWidgetContent = sourceViewPanel.mEditWidget.mEditWidgetContent;
|
||||
|
||||
int colonIdx = loc.IndexOf(':');
|
||||
if (colonIdx != -1)
|
||||
{
|
||||
int line = int.Parse(loc.Substring(0, colonIdx)).GetValueOrDefault();
|
||||
int column = int.Parse(loc.Substring(colonIdx + 1)).GetValueOrDefault();
|
||||
charIdx = (.)editWidgetContent.GetTextIdx(line, column);
|
||||
}
|
||||
if (charIdx < 0)
|
||||
return;
|
||||
|
||||
int line;
|
||||
int lineChar;
|
||||
editWidgetContent.GetLineCharAtIdx(charIdx, out line, out lineChar);
|
||||
|
|
|
@ -4966,7 +4966,12 @@ namespace IDE.ui
|
|||
{
|
||||
for (var moreInfo in bestError.mMoreInfo)
|
||||
{
|
||||
showMouseoverString.AppendF("\n@{0}\t{1}\t{2}", moreInfo.mFilePath, moreInfo.mSrcStart, moreInfo.mError);
|
||||
if ((moreInfo.mSrcStart == -1) && (moreInfo.mSrcStart == -1) && (moreInfo.mLine != -1))
|
||||
{
|
||||
showMouseoverString.AppendF("\n@{}\t{}:{}\t{}", moreInfo.mFilePath, moreInfo.mLine, moreInfo.mColumn, moreInfo.mError);
|
||||
}
|
||||
else
|
||||
showMouseoverString.AppendF("\n@{0}\t{1}\t{2}", moreInfo.mFilePath, moreInfo.mSrcStart, moreInfo.mError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue