mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Better handling of autocomplete with tokens
This commit is contained in:
parent
74f3ef4e43
commit
e16e4613b6
14 changed files with 108 additions and 65 deletions
|
@ -3517,11 +3517,15 @@ void BfModule::Visit(BfUncheckedStatement* uncheckedStmt)
|
|||
|
||||
void BfModule::DoIfStatement(BfIfStatement* ifStmt, bool includeTrueStmt, bool includeFalseStmt)
|
||||
{
|
||||
auto autoComplete = mCompiler->GetAutoComplete();
|
||||
if (autoComplete != NULL)
|
||||
autoComplete->CheckIdentifier(ifStmt->mIfToken, true);
|
||||
|
||||
if (ifStmt->mCondition == NULL)
|
||||
{
|
||||
AssertErrorState();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Only conditionally create the scopeData here if we create a variable inside the condition statement
|
||||
|
||||
|
@ -3764,6 +3768,10 @@ void BfModule::Visit(BfDeleteStatement* deleteStmt)
|
|||
{
|
||||
UpdateSrcPos(deleteStmt);
|
||||
|
||||
auto autoComplete = mCompiler->GetAutoComplete();
|
||||
if (autoComplete != NULL)
|
||||
autoComplete->CheckIdentifier(deleteStmt->mDeleteToken, true);
|
||||
|
||||
bool isAppendDelete = false;
|
||||
BfTypedValue customAllocator;
|
||||
if (deleteStmt->mAllocExpr != NULL)
|
||||
|
@ -5463,6 +5471,10 @@ void BfModule::Visit(BfWhileStatement* whileStmt)
|
|||
|
||||
void BfModule::Visit(BfForStatement* forStmt)
|
||||
{
|
||||
auto autoComplete = mCompiler->GetAutoComplete();
|
||||
if (autoComplete != NULL)
|
||||
autoComplete->CheckIdentifier(forStmt->mForToken, true);
|
||||
|
||||
UpdateSrcPos(forStmt);
|
||||
|
||||
auto startBB = mBfIRBuilder->CreateBlock("for.start", true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue