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

Method GetCursorIdx

IDEHelper/Compiler/BfAutoComplete.cpp:284–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284int BfAutoComplete::GetCursorIdx(BfAstNode* node)
285{
286 if (node == NULL)
287 return -1;
288
289// if (!node->IsFromParser(mCompiler->mResolvePassData->mParser))
290// return -1;
291
292 if (node->IsTemporary())
293 return false;
294 auto bfParser = node->GetSourceData()->ToParser();
295 if (bfParser == NULL)
296 return -1;
297
298 if ((bfParser->mParserFlags & ParserFlag_Autocomplete) == 0)
299 return -1;
300
301 return bfParser->mCursorIdx;
302}
303
304bool BfAutoComplete::IsAutocompleteNode(BfAstNode* node, int lengthAdd, int startAdd)
305{

Callers 1

VisitMethod · 0.80

Calls 3

GetSourceDataMethod · 0.80
IsTemporaryMethod · 0.45
ToParserMethod · 0.45

Tested by

no test coverage detected