mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +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 hadIllegal = false;
|
||||||
bool inAssignment = false;
|
bool inAssignment = false;
|
||||||
int bracketDepth = 0;
|
int bracketDepth = 0;
|
||||||
|
int parenDepth = 0;
|
||||||
|
|
||||||
int checkIdx = 0;
|
int checkIdx = 0;
|
||||||
while (true)
|
while (true)
|
||||||
|
@ -8324,7 +8325,15 @@ BfAstNode* BfReducer::CreateTopLevelObject(BfTokenNode* tokenNode, BfAttributeDi
|
||||||
{
|
{
|
||||||
bracketDepth--;
|
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
|
// Allow
|
||||||
}
|
}
|
||||||
|
@ -8342,7 +8351,7 @@ BfAstNode* BfReducer::CreateTopLevelObject(BfTokenNode* tokenNode, BfAttributeDi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (bracketDepth != 0)
|
else if ((bracketDepth > 0) || (parenDepth > 0))
|
||||||
{
|
{
|
||||||
// Allow
|
// Allow
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue