MCPcopy Create free account
hub / github.com/beefytech/Beef / GetFilter

Method GetFilter

IDEHelper/Compiler/BfAutoComplete.cpp:1897–1922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1895}
1896
1897String BfAutoComplete::GetFilter(BfAstNode* node)
1898{
1899 String filter = node->ToString();
1900
1901 if (mIsGetDefinition)
1902 {
1903 mInsertEndIdx = node->GetSrcEnd();
1904 }
1905 else
1906 {
1907 // Only use member name up to cursor
1908 auto bfParser = node->GetSourceData()->ToParser();
1909 int cursorIdx = bfParser->mCursorIdx;
1910 filter = filter.Substring(0, BF_CLAMP(cursorIdx - node->GetSrcStart(), 0, (int)filter.length()));
1911 mInsertEndIdx = cursorIdx;
1912 }
1913
1914 const char* cPtr = filter.c_str();
1915 while (cPtr[0] == '@')
1916 {
1917 mInsertStartIdx++;
1918 cPtr++;
1919 }
1920
1921 return filter;
1922}
1923
1924bool BfAutoComplete::CheckMemberReference(BfAstNode* target, BfAstNode* dotToken, BfAstNode* memberName, bool onlyShowTypes, BfType* expectingType, bool isUsingDirective, bool onlyAttribute)
1925{

Callers 1

DoInvocationMethod · 0.80

Calls 8

GetSourceDataMethod · 0.80
SubstringMethod · 0.80
ToStringMethod · 0.45
GetSrcEndMethod · 0.45
ToParserMethod · 0.45
GetSrcStartMethod · 0.45
lengthMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected