| 282 | } |
| 283 | |
| 284 | int 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 | |
| 304 | bool BfAutoComplete::IsAutocompleteNode(BfAstNode* node, int lengthAdd, int startAdd) |
| 305 | { |
no test coverage detected