mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +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;
|
||||
|
||||
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;
|
||||
commas.Add(tokenNode);
|
||||
isDone = !mVisitorPos.MoveNext();
|
||||
if (tokenNode->mToken == BfToken_Comma)
|
||||
{
|
||||
foundComma = true;
|
||||
commas.Add(tokenNode);
|
||||
isDone = !mVisitorPos.MoveNext();
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundComma)
|
||||
Fail("Expected ','", node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue