mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed formatting of enums with comments
This commit is contained in:
parent
df02aa3b6a
commit
af6ac720c7
1 changed files with 11 additions and 2 deletions
|
@ -2354,9 +2354,13 @@ void BfPrinter::Visit(BfConstructorDeclaration* ctorDeclaration)
|
|||
{
|
||||
//Visit((BfAstNode*)ctorDeclaration);
|
||||
|
||||
QueueVisitChild(ctorDeclaration->mAttributes);
|
||||
ExpectNewLine();
|
||||
ExpectSpace();
|
||||
if (ctorDeclaration->mAttributes != NULL)
|
||||
{
|
||||
QueueVisitChild(ctorDeclaration->mAttributes);
|
||||
ExpectNewLine();
|
||||
}
|
||||
|
||||
QueueVisitChild(ctorDeclaration->mProtectionSpecifier);
|
||||
ExpectSpace();
|
||||
QueueVisitChild(ctorDeclaration->mNewSpecifier);
|
||||
|
@ -2950,6 +2954,11 @@ void BfPrinter::Visit(BfTypeDeclaration* typeDeclaration)
|
|||
SetAndRestoreValue<BfAstNode*> prevBlockMember(mCurBlockMember, member);
|
||||
if (auto fieldDecl = BfNodeDynCast<BfFieldDeclaration>(member))
|
||||
ExpectNewLine();
|
||||
else if (auto tokenNode = BfNodeDynCast<BfTokenNode>(member))
|
||||
{
|
||||
mVirtualNewLineIdx = mNextStateModify.mWantNewLineIdx;
|
||||
mNextStateModify.mExpectingSpace = false;
|
||||
}
|
||||
VisitChild(member);
|
||||
}
|
||||
ExpectUnindent();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue