mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +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);
|
checkIdx = BF_MAX(checkIdx + 1, endNode);
|
||||||
continue;
|
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++;
|
nodeCount++;
|
||||||
checkIdx++;
|
checkIdx++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue