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:
parent
af6ac720c7
commit
acb64dad0f
1 changed files with 12 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue