mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Improved IsInitializerStatement
This commit is contained in:
parent
a5e9a33f64
commit
b922c486ec
1 changed files with 21 additions and 0 deletions
|
@ -11030,6 +11030,27 @@ bool BfReducer::IsInitializerStatement(int checkIdx)
|
|||
checkIdx = BF_MAX(checkIdx + 1, endNode);
|
||||
continue;
|
||||
}
|
||||
else if (endNode != -1)
|
||||
{
|
||||
auto nextNode = mVisitorPos.Get(endNode);
|
||||
if (auto tokenNode = BfNodeDynCast<BfTokenNode>(nextNode))
|
||||
{
|
||||
if (tokenNode->mToken == BfToken_LParen)
|
||||
{
|
||||
int checkEndNode = -1;
|
||||
if (IsTypeReference(checkNode, tokenNode->mToken, -1, &checkEndNode, &coundBeExpr))
|
||||
{
|
||||
if (checkEndNode == endNode)
|
||||
{
|
||||
// Is method call
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
nodeCount++;
|
||||
checkIdx++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue