mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 22:34:09 +02:00
Added an error with a missing comma inside an initializer expr
This commit is contained in:
parent
723010fd9d
commit
b6219ce80f
1 changed files with 11 additions and 5 deletions
|
@ -7568,14 +7568,20 @@ BfInitializerExpression* BfReducer::TryCreateInitializerExpression(BfAstNode* ta
|
||||||
bool foundComma = false;
|
bool foundComma = false;
|
||||||
|
|
||||||
node = mVisitorPos.GetCurrent();
|
node = mVisitorPos.GetCurrent();
|
||||||
if (auto tokenNode = BfNodeDynCast<BfTokenNode>(node))
|
if (node != NULL)
|
||||||
{
|
{
|
||||||
if (tokenNode->mToken == BfToken_Comma)
|
if (auto tokenNode = BfNodeDynCast<BfTokenNode>(node))
|
||||||
{
|
{
|
||||||
foundComma = true;
|
if (tokenNode->mToken == BfToken_Comma)
|
||||||
commas.Add(tokenNode);
|
{
|
||||||
isDone = !mVisitorPos.MoveNext();
|
foundComma = true;
|
||||||
|
commas.Add(tokenNode);
|
||||||
|
isDone = !mVisitorPos.MoveNext();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!foundComma)
|
||||||
|
Fail("Expected ','", node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue