mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 23:36:00 +02:00
Added 'using' fields
This commit is contained in:
parent
ff229f385d
commit
450d541292
13 changed files with 850 additions and 253 deletions
|
@ -1821,19 +1821,91 @@ public:
|
|||
Array<BfAtomComposite> mNamespaces;
|
||||
};
|
||||
|
||||
class BfUsingFieldData
|
||||
{
|
||||
public:
|
||||
struct MemberRef
|
||||
{
|
||||
enum Kind
|
||||
{
|
||||
Kind_None,
|
||||
Kind_Field,
|
||||
Kind_Property,
|
||||
Kind_Method,
|
||||
Kind_Local
|
||||
};
|
||||
|
||||
BfTypeInstance* mTypeInstance;
|
||||
Kind mKind;
|
||||
int mIdx;
|
||||
|
||||
MemberRef()
|
||||
{
|
||||
mTypeInstance = NULL;
|
||||
mKind = Kind_None;
|
||||
mIdx = -1;
|
||||
}
|
||||
|
||||
MemberRef(BfTypeInstance* typeInst, BfFieldDef* fieldDef)
|
||||
{
|
||||
mTypeInstance = typeInst;
|
||||
mKind = Kind_Field;
|
||||
mIdx = fieldDef->mIdx;
|
||||
}
|
||||
|
||||
MemberRef(BfTypeInstance* typeInst, BfMethodDef* methodDef)
|
||||
{
|
||||
mTypeInstance = typeInst;
|
||||
mKind = Kind_Method;
|
||||
mIdx = methodDef->mIdx;
|
||||
}
|
||||
|
||||
MemberRef(BfTypeInstance* typeInst, BfPropertyDef* propDef)
|
||||
{
|
||||
mTypeInstance = typeInst;
|
||||
mKind = Kind_Property;
|
||||
mIdx = propDef->mIdx;
|
||||
}
|
||||
|
||||
BfProtection GetProtection() const;
|
||||
BfProtection GetUsingProtection() const;
|
||||
BfTypeDef* GetDeclaringType(BfModule* curModule) const;
|
||||
String GetFullName(BfModule* curModule) const;
|
||||
String GetName(BfModule* curModule) const;
|
||||
BfAstNode* GetRefNode(BfModule* curModule) const;
|
||||
bool IsStatic() const;
|
||||
};
|
||||
|
||||
struct Entry
|
||||
{
|
||||
SizedArray<SizedArray<MemberRef, 1>, 1> mLookups;
|
||||
};
|
||||
|
||||
public:
|
||||
Dictionary<String, Entry> mEntries;
|
||||
Dictionary<String, Entry> mMethods;
|
||||
};
|
||||
|
||||
class BfTypeInfoEx
|
||||
{
|
||||
public:
|
||||
BfUsingFieldData* mUsingFieldData;
|
||||
BfType* mUnderlyingType;
|
||||
int64 mMinValue;
|
||||
int64 mMaxValue;
|
||||
|
||||
BfTypeInfoEx()
|
||||
{
|
||||
mUsingFieldData = NULL;
|
||||
mUnderlyingType = NULL;
|
||||
mMinValue = 0;
|
||||
mMaxValue = 0;
|
||||
}
|
||||
|
||||
~BfTypeInfoEx()
|
||||
{
|
||||
delete mUsingFieldData;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue