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:
parent
ee50457885
commit
958a1630aa
13 changed files with 202 additions and 28 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue