| 302 | } |
| 303 | |
| 304 | bool BfAutoComplete::IsAutocompleteNode(BfAstNode* node, int lengthAdd, int startAdd) |
| 305 | { |
| 306 | if (mModule == NULL) |
| 307 | return false; |
| 308 | if (node == NULL) |
| 309 | return false; |
| 310 | |
| 311 | // if (!node->IsFromParser(mCompiler->mResolvePassData->mParser)) |
| 312 | // return false; |
| 313 | |
| 314 | if (node->IsTemporary()) |
| 315 | return false; |
| 316 | auto bfParser = node->GetSourceData()->ToParser(); |
| 317 | if (bfParser == NULL) |
| 318 | return false; |
| 319 | if ((bfParser->mParserFlags & ParserFlag_Autocomplete) == 0) |
| 320 | return false; |
| 321 | |
| 322 | //if (mCompiler->mResolvePassData->mResolveType != BfResolveType_Autocomplete) |
| 323 | lengthAdd++; |
| 324 | |
| 325 | int cursorIdx = bfParser->mCursorCheckIdx; |
| 326 | int nodeSrcStart = node->GetSrcStart(); |
| 327 | if ((cursorIdx < nodeSrcStart + startAdd) || (cursorIdx >= node->GetSrcEnd() + lengthAdd)) |
| 328 | return false; |
| 329 | return true; |
| 330 | } |
| 331 | |
| 332 | bool BfAutoComplete::IsAutocompleteNode(BfAstNode* startNode, BfAstNode* endNode, int lengthAdd, int startAdd) |
| 333 | { |
no test coverage detected