mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
Emit comments for class and constructor
This commit is contained in:
@@ -1401,10 +1401,13 @@ module ts {
|
||||
|
||||
function emitClassDeclaration(node: ClassDeclaration) {
|
||||
var ctor = getFirstConstructorWithBody(node);
|
||||
emitLeadingComments(node);
|
||||
write("var ");
|
||||
emit(node.name);
|
||||
write(" = (function (");
|
||||
if (node.baseType) write("_super");
|
||||
if (node.baseType) {
|
||||
write("_super");
|
||||
}
|
||||
write(") {");
|
||||
increaseIndent();
|
||||
scopeEmitStart(node);
|
||||
@@ -1417,6 +1420,9 @@ module ts {
|
||||
emitEnd(node.baseType);
|
||||
}
|
||||
writeLine();
|
||||
if (ctor) {
|
||||
emitLeadingComments(ctor);
|
||||
}
|
||||
emitStart(<Node>ctor || node);
|
||||
write("function ");
|
||||
emit(node.name);
|
||||
@@ -1456,6 +1462,9 @@ module ts {
|
||||
emitToken(SyntaxKind.CloseBraceToken, ctor ? (<Block>ctor.body).statements.end : node.members.end);
|
||||
scopeEmitEnd();
|
||||
emitEnd(<Node>ctor || node);
|
||||
if (ctor) {
|
||||
emitTrailingComments(ctor);
|
||||
}
|
||||
emitMemberFunctions(node);
|
||||
emitMemberAssignments(node, NodeFlags.Static);
|
||||
writeLine();
|
||||
@@ -1485,6 +1494,7 @@ module ts {
|
||||
emitEnd(node);
|
||||
write(";");
|
||||
}
|
||||
emitTrailingComments(node);
|
||||
}
|
||||
|
||||
function emitEnumDeclaration(node: EnumDeclaration) {
|
||||
|
||||
Reference in New Issue
Block a user