Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Sep 22, 2022
1 parent d90f6ec commit 7ef541c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/babel-generator/src/generators/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,11 @@ export function BlockStatement(this: Printer, node: t.BlockStatement) {
this.printSequence(node.body, node, { indent: true });
this.removeTrailingNewline();

this.sourceWithOffset("end", node.loc, 0, -1);

if (!this.endsWith(charCodes.lineFeed)) this.newline();

this.rightBrace();
} else {
this.sourceWithOffset("end", node.loc, 0, -1);
this.token("}");
}

this.sourceWithOffset("end", node.loc, 0, -1);
this.rightBrace();
}

export function Directive(this: Printer, node: t.Directive) {
Expand Down

0 comments on commit 7ef541c

Please sign in to comment.