mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Properly throw error on missing comma with multidim array
This commit is contained in:
parent
fb1d1aecc0
commit
a5fff0fdbc
1 changed files with 8 additions and 0 deletions
|
@ -5061,12 +5061,20 @@ BfTypeReference* BfReducer::DoCreateTypeRef(BfAstNode* firstNode, CreateTypeRefF
|
||||||
|
|
||||||
if (tokenNode == NULL)
|
if (tokenNode == NULL)
|
||||||
{
|
{
|
||||||
|
if ((!params.IsEmpty()) && (!BfNodeIsExact<BfTokenNode>(params.back())))
|
||||||
|
{
|
||||||
|
FailAfter("Expected ','", params.back());
|
||||||
|
hasFailed = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
BfExpression* sizeExpr = CreateExpressionAfter(arrayType);
|
BfExpression* sizeExpr = CreateExpressionAfter(arrayType);
|
||||||
if (sizeExpr == NULL)
|
if (sizeExpr == NULL)
|
||||||
{
|
{
|
||||||
hasFailed = true;
|
hasFailed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
MoveNode(sizeExpr, arrayType);
|
MoveNode(sizeExpr, arrayType);
|
||||||
params.push_back(sizeExpr);
|
params.push_back(sizeExpr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue