| 4578 | } |
| 4579 | |
| 4580 | void DbgExprEvaluator::AutocompleteCheckMemberReference(BfAstNode* target, BfAstNode* dotToken, BfAstNode* memberName) |
| 4581 | { |
| 4582 | if ((IsAutoCompleteNode(dotToken)) || (IsAutoCompleteNode(memberName))) |
| 4583 | { |
| 4584 | mDbgModule->ParseGlobalsData(); |
| 4585 | bool isCType = dotToken->ToString() == "::"; |
| 4586 | |
| 4587 | String filter; |
| 4588 | if (memberName != NULL) |
| 4589 | { |
| 4590 | filter = memberName->ToString(); |
| 4591 | mAutoComplete->mInsertStartIdx = memberName->GetSrcStart(); |
| 4592 | mAutoComplete->mInsertEndIdx = memberName->GetSrcEnd(); |
| 4593 | } |
| 4594 | else |
| 4595 | { |
| 4596 | mAutoComplete->mInsertStartIdx = dotToken->GetSrcEnd(); |
| 4597 | mAutoComplete->mInsertEndIdx = dotToken->GetSrcEnd(); |
| 4598 | } |
| 4599 | |
| 4600 | SetAndRestoreValue<bool> prevIgnoreError(mIgnoreErrors, true); |
| 4601 | if (target == NULL) |
| 4602 | { |
| 4603 | mResult.mType = GetExpectingType(); |
| 4604 | if (mResult.mType != NULL) |
| 4605 | mResult.mHasNoValue = true; |
| 4606 | } |
| 4607 | else if (auto typeRef = BfNodeDynCast<BfTypeReference>(target)) |
| 4608 | { |
| 4609 | mResult.mType = ResolveTypeRef(typeRef); |
| 4610 | mResult.mHasNoValue = true; |
| 4611 | } |
| 4612 | else |
| 4613 | { |
| 4614 | VisitChild(target); |
| 4615 | GetResult(); |
| 4616 | } |
| 4617 | |
| 4618 | if (mResult.mType != NULL) |
| 4619 | { |
| 4620 | mResult.mType = mResult.mType->RemoveModifiers(); |
| 4621 | |
| 4622 | auto dbgType = mResult.mType; |
| 4623 | // if (dbgType->IsPrimitiveType()) |
| 4624 | // { |
| 4625 | // //TODO: Boxed primitive structs |
| 4626 | // } |
| 4627 | |
| 4628 | //dbgType = dbgType->GetPrimaryType(); |
| 4629 | if ((dbgType != NULL) && (dbgType->IsPointerOrRef())) |
| 4630 | { |
| 4631 | dbgType = dbgType->mTypeParam; |
| 4632 | dbgType = dbgType->RemoveModifiers(); |
| 4633 | } |
| 4634 | //if (dbgType->mIsDeclaration) |
| 4635 | dbgType = dbgType->GetPrimaryType(); |
| 4636 | |
| 4637 | if ((dbgType != NULL) /*&& ((dbgType->IsCompositeType()) || (dbgType->IsEnum()))*/) |
nothing calls this directly
no test coverage detected