11import { NonterminalKind } from '@nomicfoundation/slang/cst' ;
2- import { doc } from 'prettier' ;
3- import { printSeparatedItem } from '../slang-printers/print-separated-item.js' ;
4- import { printPreservingEmptyLines } from '../slang-printers/print-preserving-empty-lines.js' ;
2+ import { printIndentedPreservingEmptyLines } from '../slang-printers/print-preserving-empty-lines.js' ;
53import { extractVariant } from '../slang-utils/extract-variant.js' ;
64import { SlangNode } from './SlangNode.js' ;
75import { ContractMember } from './ContractMember.js' ;
@@ -11,8 +9,6 @@ import type { AstPath, Doc, ParserOptions } from 'prettier';
119import type { CollectedMetadata , PrintFunction } from '../types.d.ts' ;
1210import type { PrintableNode } from './types.d.ts' ;
1311
14- const { hardline } = doc . builders ;
15-
1612export class InterfaceMembers extends SlangNode {
1713 readonly kind = NonterminalKind . InterfaceMembers ;
1814
@@ -35,11 +31,6 @@ export class InterfaceMembers extends SlangNode {
3531 path : AstPath < InterfaceMembers > ,
3632 options : ParserOptions < PrintableNode >
3733 ) : Doc {
38- return this . items . length > 0 || ( this . comments ?. length || 0 ) > 0
39- ? printSeparatedItem (
40- printPreservingEmptyLines ( this , path , print , options ) ,
41- { firstSeparator : hardline }
42- )
43- : '' ;
34+ return printIndentedPreservingEmptyLines ( this , path , print , options ) ;
4435 }
4536}
0 commit comments