mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Parsing fixes for initializer expressions
This commit is contained in:
parent
aaf3eb86f6
commit
6b680d2b70
1 changed files with 12 additions and 11 deletions
|
@ -7022,13 +7022,14 @@ BfInitializerExpression* BfReducer::TryCreateInitializerExpression(BfExpression*
|
|||
|
||||
bool isDone = !mVisitorPos.MoveNext();
|
||||
|
||||
BfDeferredAstSizedArray<BfExpression*> values(initializerExpr->mValues, mAlloc);
|
||||
BfDeferredAstSizedArray<BfTokenNode*> commas(initializerExpr->mCommas, mAlloc);
|
||||
BfDeferredAstNodeSizedArray<BfExpression*> values(initializerExpr, initializerExpr->mValues, mAlloc);
|
||||
BfDeferredAstNodeSizedArray<BfTokenNode*> commas(initializerExpr, initializerExpr->mCommas, mAlloc);
|
||||
|
||||
BfAstNode* nextNode = NULL;
|
||||
while (!isDone)
|
||||
{
|
||||
BfAstNode* node = mVisitorPos.GetCurrent();
|
||||
initializerExpr->mSrcEnd = node->mSrcEnd;
|
||||
|
||||
auto expr = CreateExpression(node);
|
||||
isDone = !mVisitorPos.MoveNext();
|
||||
|
@ -7048,7 +7049,7 @@ BfInitializerExpression* BfReducer::TryCreateInitializerExpression(BfExpression*
|
|||
{
|
||||
foundComma = true;
|
||||
commas.Add(tokenNode);
|
||||
mVisitorPos.MoveNext();
|
||||
isDone = !mVisitorPos.MoveNext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue