1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Allowed more flexible attribute type lookup, supporting inner types

This commit is contained in:
Brian Fiete 2020-05-18 13:12:18 -07:00
parent 3509d659ea
commit 86d8f78761
5 changed files with 49 additions and 66 deletions

View file

@ -1276,6 +1276,7 @@ enum BfResolveTypeRefFlags
BfResolveTypeRefFlag_AllowGenericParamConstValue = 0x10 | 0x20,
BfResolveTypeRefFlag_AutoComplete = 0x40,
BfResolveTypeRefFlag_FromIndirectSource = 0x80, // Such as a type alias or a generic parameter
BfResolveTypeRefFlag_Attribute = 0x100
};
enum BfSrcPosFlags
@ -1689,7 +1690,7 @@ public:
BfTypeDef* FindTypeDefRaw(const BfAtomComposite& findName, int numGenericArgs, BfTypeInstance* typeInstance, BfTypeDef* useTypeDef, BfTypeLookupError* error);
BfTypeDef* FindTypeDef(const BfAtomComposite& findName, int numGenericArgs = 0, BfTypeInstance* typeInstanceOverride = NULL, BfTypeLookupError* error = NULL);
BfTypeDef* FindTypeDef(const StringImpl& typeName, int numGenericArgs = 0, BfTypeInstance* typeInstanceOverride = NULL, BfTypeLookupError* error = NULL);
BfTypeDef* FindTypeDef(BfTypeReference* typeRef, BfTypeInstance* typeInstanceOverride = NULL, BfTypeLookupError* error = NULL, int numGenericParams = 0);
BfTypeDef* FindTypeDef(BfTypeReference* typeRef, BfTypeInstance* typeInstanceOverride = NULL, BfTypeLookupError* error = NULL, int numGenericParams = 0, BfResolveTypeRefFlags resolveFlags = (BfResolveTypeRefFlags)0);
BfTypedValue TryLookupGenericConstVaue(BfIdentifierNode* identifierNode, BfType* expectingType);
void CheckTypeRefFixit(BfAstNode* typeRef, const char* appendName = NULL);
void CheckIdentifierFixit(BfAstNode* node);