1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed enum case initialization from method call

This commit is contained in:
Brian Fiete 2022-03-18 22:00:53 -07:00
parent af6ac720c7
commit acb64dad0f

View file

@ -8293,6 +8293,7 @@ BfAstNode* BfReducer::CreateTopLevelObject(BfTokenNode* tokenNode, BfAttributeDi
bool hadIllegal = false;
bool inAssignment = false;
int bracketDepth = 0;
int parenDepth = 0;
int checkIdx = 0;
while (true)
@ -8324,7 +8325,15 @@ BfAstNode* BfReducer::CreateTopLevelObject(BfTokenNode* tokenNode, BfAttributeDi
{
bracketDepth--;
}
else if (bracketDepth != 0)
else if (tokenNode->mToken == BfToken_LParen)
{
parenDepth++;
}
else if (tokenNode->mToken == BfToken_RParen)
{
parenDepth--;
}
else if ((bracketDepth > 0) || (parenDepth > 0))
{
// Allow
}
@ -8342,7 +8351,7 @@ BfAstNode* BfReducer::CreateTopLevelObject(BfTokenNode* tokenNode, BfAttributeDi
}
}
}
else if (bracketDepth != 0)
else if ((bracketDepth > 0) || (parenDepth > 0))
{
// Allow
}