mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-21 17:28:00 +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;
|
||||
}
|
||||
|
||||
bool hasSemicolon = false;
|
||||
|
||||
auto fieldDtor = CreateFieldDtorDeclaration(fieldDeclaration);
|
||||
if (fieldDtor != NULL)
|
||||
{
|
||||
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
|
||||
mVisitorPos.mReadPos--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue