mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed parsing error with malformed object initializer
This commit is contained in:
parent
45deac0ba3
commit
df6ca9e9ed
1 changed files with 10 additions and 0 deletions
|
@ -8098,9 +8098,19 @@ BfObjectCreateExpression* BfReducer::CreateObjectCreateExpression(BfAstNode* all
|
|||
{
|
||||
SetAndRestoreValue<BfVisitorPos> prevVisitorPos(mVisitorPos, BfVisitorPos(block));
|
||||
ReadArguments(objectCreateExpr, objectCreateExpr, &arguments, &commas, BfToken_None, true);
|
||||
|
||||
while (true)
|
||||
{
|
||||
auto nextNode = mVisitorPos.GetNext();
|
||||
if (nextNode == NULL)
|
||||
break;
|
||||
AddErrorNode(nextNode);
|
||||
mVisitorPos.MoveNext();
|
||||
}
|
||||
}
|
||||
if (block->mCloseBrace != NULL)
|
||||
MEMBER_SET(objectCreateExpr, mCloseToken, block->mCloseBrace);
|
||||
objectCreateExpr->mSrcEnd = block->mSrcEnd;
|
||||
return objectCreateExpr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue