mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Emit leading comment before brace token
This commit is contained in:
1 parent
7fd404dbbc
commit
80eae169ee
20 files changed
+155
-18
No files matched your search
@@ -1347,6 +1347,8 @@ namespace ts {
|
||||
else {
|
||||
writeToken(SyntaxKind.OpenBraceToken, node.pos, /*contextNode*/ node);
|
||||
emitBlockStatements(node);
|
||||
// We have to call emitLeadingComments explicitly here because otherwise leading comments of the close brace token will not be emitted
|
||||
emitLeadingComments(node.statements.end, /*isEmittedNode*/true);
|
||||
writeToken(SyntaxKind.CloseBraceToken, node.statements.end, /*contextNode*/ node);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user