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

Method CheckVarResolution

IDEHelper/Compiler/BfAutoComplete.cpp:3085–3108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3083}
3084
3085void BfAutoComplete::CheckVarResolution(BfAstNode* varTypeRef, BfType* resolvedType)
3086{
3087 if (IsAutocompleteNode(varTypeRef))
3088 {
3089 if ((resolvedType == NULL) || (resolvedType->IsVar()) || (resolvedType->IsLet()))
3090 return;
3091
3092 if (mIsGetDefinition)
3093 {
3094 auto typeInst = resolvedType->ToTypeInstance();
3095 if (typeInst != NULL)
3096 {
3097 if (typeInst->mTypeDef->mTypeDeclaration != NULL)
3098 SetDefinitionLocation(typeInst->mTypeDef->mTypeDeclaration->mNameNode);
3099 }
3100 }
3101
3102 if (mResolveType == BfResolveType_GetResultString)
3103 {
3104 mResultString = ":";
3105 mResultString += mModule->TypeToString(resolvedType, (BfTypeNameFlags)(BfTypeNameFlag_ExtendedInfo | BfTypeNameFlag_ResolveGenericParamNames));
3106 }
3107 }
3108}
3109
3110class BfAutocompleteNodeChecker : public BfStructuralVisitor
3111{

Callers 6

HandleCaseBindMethod · 0.80
DoForLessMethod · 0.80
VisitMethod · 0.80

Calls 4

IsVarMethod · 0.45
IsLetMethod · 0.45
ToTypeInstanceMethod · 0.45
TypeToStringMethod · 0.45

Tested by

no test coverage detected