1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Added support for global:: lookups

This commit is contained in:
Brian Fiete 2025-05-18 12:13:15 +02:00
parent ee50457885
commit 958a1630aa
13 changed files with 202 additions and 28 deletions

View file

@ -1853,7 +1853,7 @@ void BfAutoComplete::CheckIdentifier(BfAstNode* identifierNode, bool isInExpress
{
"alignof", "append", "as", "asm", "base", "break", "case", "catch", "checked", "continue", "const", "default", "defer",
"delegate", "delete", "do", "else", "false", "finally",
"fixed", "for", "function", "if", "implicit", "in", "internal", "is", "isconst", "new", "mixin", "not", "null",
"fixed", "for", "function", "global", "if", "implicit", "in", "internal", "is", "isconst", "new", "mixin", "not", "null",
"offsetof", "out", "params", "readonly", "ref", "rettype", "return",
"sealed", "sizeof", "scope", "static", "strideof", "struct", "switch", /*"this",*/ "try", "true", "typeof", "unchecked",
"using", "var", "virtual", "volatile", "where", "while",
@ -1873,7 +1873,7 @@ void BfAutoComplete::CheckIdentifier(BfAstNode* identifierNode, bool isInExpress
const char* tokens[] =
{
"abstract", "append", "base", "class", "concrete", "const",
"delegate", "extern", "enum", "explicit", "extension", "function",
"delegate", "extern", "enum", "explicit", "extension", "function", "global",
"interface", "in", "implicit", "internal", "mixin", "namespace", "new",
"operator", "out", "override", "params", "private", "protected", "public", "readonly", "ref", "rettype", "return",
"scope", "sealed", "static", "struct", "this", "typealias",
@ -1926,6 +1926,16 @@ bool BfAutoComplete::CheckMemberReference(BfAstNode* target, BfAstNode* dotToken
if (!WantsEntries())
return false;
bool isGlobalLookup = true;
if (auto dotTokenNode = BfNodeDynCast<BfTokenNode>(dotToken))
{
if (dotTokenNode->mToken == BfToken_ColonColon)
{
CheckNode(memberName, false, false);
return false;
}
}
BfAttributedIdentifierNode* attrIdentifier = NULL;
bool isAutocompletingName = false;
if ((attrIdentifier = BfNodeDynCast<BfAttributedIdentifierNode>(memberName)))