mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Expect semicolon after expression body property
This commit is contained in:
parent
926259e121
commit
865e70d73a
2 changed files with 5 additions and 0 deletions
|
@ -2839,6 +2839,7 @@ void BfPrinter::Visit(BfPropertyDeclaration* propertyDeclaration)
|
|||
for (auto method : propertyDeclaration->mMethods)
|
||||
{
|
||||
QueueVisitChild(method->mBody);
|
||||
QueueVisitChild(method->mEndSemicolon);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7769,6 +7769,10 @@ BfAstNode* BfReducer::ReadTypeMember(BfAstNode* node, bool declStarted, int dept
|
|||
{
|
||||
MEMBER_SET(method, mBody, expr);
|
||||
propertyDeclaration->SetSrcEnd(expr->GetSrcEnd());
|
||||
|
||||
auto endSemicolon = ExpectTokenAfter(expr, BfToken_Semicolon);
|
||||
if (endSemicolon != NULL)
|
||||
MEMBER_SET(method, mEndSemicolon, endSemicolon);
|
||||
}
|
||||
|
||||
methods.Add(method);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue