1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-17 23:56:05 +02:00

Merge branch 'master' into FuzzyAutoComplete

This commit is contained in:
Brian Fiete 2021-12-28 17:07:19 +01:00 committed by GitHub
commit 62c3998521
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 2485 additions and 598 deletions

View file

@ -76,6 +76,9 @@ namespace IDE.Compiler
[CallingConvention(.Stdcall), CLink]
static extern int32 BfCompiler_GetCurConstEvalExecuteId(void* bfCompiler);
[CallingConvention(.Stdcall), CLink]
static extern bool BfCompiler_GetLastHadComptimeRebuilds(void* bfCompiler);
[CallingConvention(.Stdcall), CLink]
static extern void BfCompiler_Delete(void* bfCompiler);
@ -834,5 +837,10 @@ namespace IDE.Compiler
}
}
}
public bool GetLastHadComptimeRebuilds()
{
return BfCompiler_GetLastHadComptimeRebuilds(mNativeBfCompiler);
}
}
}

View file

@ -78,8 +78,9 @@ namespace IDE.Compiler
public bool mCancelled;
public int32 mTextVersion = -1;
public bool mIsUserRequested;
public bool mDoFuzzyAutoComplete;
public Stopwatch mStopwatch ~ delete _;
public ProfileInstance mProfileInstance ~ _.Dispose();
}
public class BfParser : ILeakIdentifiable
@ -122,7 +123,7 @@ namespace IDE.Compiler
static extern bool BfParser_Reduce(void* bfParser, void* bfPassInstance);
[CallingConvention(.Stdcall), CLink]
static extern char8* BfParser_Format(void* bfParser, int32 formatEnd, int32 formatStart, out int32* outCharMapping);
static extern char8* BfParser_Format(void* bfParser, int32 formatEnd, int32 formatStart, out int32* outCharMapping, int32 maxCol);
[CallingConvention(.Stdcall), CLink]
static extern char8* BfParser_GetDebugExpressionAt(void* bfParser, int32 cursorIdx);
@ -209,8 +210,9 @@ namespace IDE.Compiler
public void Reformat(int formatStart, int formatEnd, out int32[] char8Mapping, String str)
{
int32* char8MappingPtr;
var stringPtr = BfParser_Format(mNativeBfParser, (int32)formatStart, (int32)formatEnd, out char8MappingPtr);
str.Append(stringPtr);
var maxCol = gApp.mSettings.mEditorSettings.mWrapCommentsAt;
var stringPtr = BfParser_Format(mNativeBfParser, (int32)formatStart, (int32)formatEnd, out char8MappingPtr, maxCol);
str.Append(stringPtr);
char8Mapping = new int32[str.Length];
for (int32 i = 0; i < char8Mapping.Count; i++)

View file

@ -51,7 +51,7 @@ namespace IDE.Compiler
static extern char8* BfSystem_GetNamespaceSearch(void* bfSystem, char8* typeName, void* project);
[CallingConvention(.Stdcall), CLink]
static extern void* BfSystem_CreateProject(void* bfSystem, char8* projectName);
static extern void* BfSystem_CreateProject(void* bfSystem, char8* projectName, char8* projectDir);
[CallingConvention(.Stdcall), CLink]
static extern void BfSystem_ClearTypeOptions(void* bfSystem);
@ -142,7 +142,7 @@ namespace IDE.Compiler
{
using (mMonitor.Enter())
{
var bfProject = CreateProject(project.mProjectName);
var bfProject = CreateProject(project.mProjectName, project.mProjectDir);
mProjectMap[project] = bfProject;
}
}
@ -188,10 +188,10 @@ namespace IDE.Compiler
outNamespaceSearch.Append(namespaceSearch);
}
public BfProject CreateProject(String projectName)
public BfProject CreateProject(String projectName, String projectDir)
{
BfProject project = new BfProject();
project.mNativeBfProject = BfSystem_CreateProject(mNativeBfSystem, projectName);
project.mNativeBfProject = BfSystem_CreateProject(mNativeBfSystem, projectName, projectDir);
return project;
}