mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-22 09:38:01 +02:00
Fixed double-semicolon requirement on field dtors with compound stmt
This commit is contained in:
parent
85a2a089f4
commit
288b99cc3c
1 changed files with 7 additions and 1 deletions
|
@ -5777,11 +5777,17 @@ BfFieldDeclaration* BfReducer::CreateFieldDeclaration(BfTokenNode* tokenNode, Bf
|
||||||
return fieldDeclaration;
|
return fieldDeclaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hasSemicolon = false;
|
||||||
|
|
||||||
auto fieldDtor = CreateFieldDtorDeclaration(fieldDeclaration);
|
auto fieldDtor = CreateFieldDtorDeclaration(fieldDeclaration);
|
||||||
if (fieldDtor != NULL)
|
if (fieldDtor != NULL)
|
||||||
|
{
|
||||||
fieldDeclaration->mFieldDtor = fieldDtor;
|
fieldDeclaration->mFieldDtor = fieldDtor;
|
||||||
|
if (fieldDtor->mBody != NULL)
|
||||||
|
hasSemicolon = !fieldDtor->mBody->IsMissingSemicolon();
|
||||||
|
}
|
||||||
|
|
||||||
if (ExpectTokenAfter(fieldDeclaration, BfToken_Semicolon, BfToken_Comma) != NULL)
|
if ((!hasSemicolon) && (ExpectTokenAfter(fieldDeclaration, BfToken_Semicolon, BfToken_Comma) != NULL))
|
||||||
{
|
{
|
||||||
// This gets taken later
|
// This gets taken later
|
||||||
mVisitorPos.mReadPos--;
|
mVisitorPos.mReadPos--;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue