1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Better support for @ name prefixes

This commit is contained in:
Brian Fiete 2021-11-29 08:38:42 -08:00
parent 7691c414c3
commit aa56542fae
12 changed files with 158 additions and 40 deletions

View file

@ -383,6 +383,30 @@ BfSizedAtomComposite::~BfSizedAtomComposite()
//////////////////////////////////////////////////////////////////////////
void BfMemberDef::SetName(BfAstNode* nameNode)
{
StringView sv = nameNode->ToStringView();
while ((!sv.IsEmpty()) && (sv[0] == '@'))
{
sv.RemoveFromStart(1);
mNamePrefixCount++;
}
mName = sv;
}
void BfParameterDef::SetName(BfAstNode* nameNode)
{
StringView sv = nameNode->ToStringView();
while ((!sv.IsEmpty()) && (sv[0] == '@'))
{
sv.RemoveFromStart(1);
mNamePrefixCount++;
}
mName = sv;
}
//////////////////////////////////////////////////////////////////////////
bool BfPropertyDef::IsVirtual()
{
if (((BfPropertyDeclaration*)mFieldDeclaration)->mVirtualSpecifier)
@ -4484,3 +4508,5 @@ BF_EXPORT void BF_CALLTYPE BfSystem_Log(BfSystem* bfSystem, char* str)
BfLogSys(bfSystem, str);
BfLogSys(bfSystem, "\n");
}