|
@@ -2354,9 +2354,13 @@ void BfPrinter::Visit(BfConstructorDeclaration* ctorDeclaration)
|
|
{
|
|
{
|
|
//Visit((BfAstNode*)ctorDeclaration);
|
|
//Visit((BfAstNode*)ctorDeclaration);
|
|
|
|
|
|
- QueueVisitChild(ctorDeclaration->mAttributes);
|
|
|
|
ExpectNewLine();
|
|
ExpectNewLine();
|
|
- ExpectSpace();
|
|
|
|
|
|
+ if (ctorDeclaration->mAttributes != NULL)
|
|
|
|
+ {
|
|
|
|
+ QueueVisitChild(ctorDeclaration->mAttributes);
|
|
|
|
+ ExpectNewLine();
|
|
|
|
+ }
|
|
|
|
+
|
|
QueueVisitChild(ctorDeclaration->mProtectionSpecifier);
|
|
QueueVisitChild(ctorDeclaration->mProtectionSpecifier);
|
|
ExpectSpace();
|
|
ExpectSpace();
|
|
QueueVisitChild(ctorDeclaration->mNewSpecifier);
|
|
QueueVisitChild(ctorDeclaration->mNewSpecifier);
|
|
@@ -2950,6 +2954,11 @@ void BfPrinter::Visit(BfTypeDeclaration* typeDeclaration)
|
|
SetAndRestoreValue<BfAstNode*> prevBlockMember(mCurBlockMember, member);
|
|
SetAndRestoreValue<BfAstNode*> prevBlockMember(mCurBlockMember, member);
|
|
if (auto fieldDecl = BfNodeDynCast<BfFieldDeclaration>(member))
|
|
if (auto fieldDecl = BfNodeDynCast<BfFieldDeclaration>(member))
|
|
ExpectNewLine();
|
|
ExpectNewLine();
|
|
|
|
+ else if (auto tokenNode = BfNodeDynCast<BfTokenNode>(member))
|
|
|
|
+ {
|
|
|
|
+ mVirtualNewLineIdx = mNextStateModify.mWantNewLineIdx;
|
|
|
|
+ mNextStateModify.mExpectingSpace = false;
|
|
|
|
+ }
|
|
VisitChild(member);
|
|
VisitChild(member);
|
|
}
|
|
}
|
|
ExpectUnindent();
|
|
ExpectUnindent();
|