Skip to content

Commit 541b7f8

Browse files
committed
spotted a printSeparatedItem pattern that I missed
1 parent 6d726a7 commit 541b7f8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/slang-nodes/DoWhileStatement.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { AstPath, Doc, ParserOptions } from 'prettier';
1010
import type { AstNode } from './types.d.ts';
1111
import type { PrintFunction } from '../types.d.ts';
1212

13-
const { group, indent, line } = doc.builders;
13+
const { line } = doc.builders;
1414

1515
export class DoWhileStatement extends SlangNode {
1616
readonly kind = NonterminalKind.DoWhileStatement;
@@ -34,7 +34,7 @@ export class DoWhileStatement extends SlangNode {
3434
'do',
3535
this.body.variant.kind === NonterminalKind.Block
3636
? [' ', body, ' ']
37-
: group([indent([line, body]), line]),
37+
: printSeparatedItem(body, { firstSeparator: line }),
3838
'while (',
3939
printSeparatedItem(path.call(print, 'condition')),
4040
');'

0 commit comments

Comments
 (0)