1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Improving auto-implemented properties

This commit is contained in:
Brian Fiete 2020-04-10 07:53:56 -07:00
parent 66aeb0a302
commit 664078557f
7 changed files with 212 additions and 24 deletions

View file

@ -714,6 +714,19 @@ public:
//return (mKind != BfTypedValueKind_NoValue) && ((mValue) || ((mType != NULL) && (IsValuelessType())));
return (mKind != BfTypedValueKind_NoValue);
}
void MakeReadOnly()
{
switch (mKind)
{
case BfTypedValueKind_Addr:
mKind = BfTypedValueKind_ReadOnlyAddr;
break;
case BfTypedValueKind_TempAddr:
mKind = BfTypedValueKind_ReadOnlyTempAddr;
break;
}
}
};
#define BF_AST_TYPE(name, TBase) \