Skip to content

Commit 350d768

Browse files
Fix usage of tabs instead of spaces.
1 parent aed3b4c commit 350d768

File tree

1 file changed

+62
-62
lines changed

1 file changed

+62
-62
lines changed

src/compiler/emitter.ts

+62-62
Original file line numberDiff line numberDiff line change
@@ -3315,66 +3315,66 @@ module ts {
33153315

33163316
if (!node.body) {
33173317
writeLine();
3318-
write("}");
3319-
}
3320-
else {
3321-
increaseIndent();
3322-
3323-
emitDetachedComments(node.body.kind === SyntaxKind.Block ? (<Block>node.body).statements : node.body);
3324-
3325-
var startIndex = 0;
3326-
if (node.body.kind === SyntaxKind.Block) {
3327-
startIndex = emitDirectivePrologues((<Block>node.body).statements, /*startWithNewLine*/ true);
3328-
}
3329-
var outPos = writer.getTextPos();
3330-
3331-
emitCaptureThisForNodeIfNecessary(node);
3332-
emitDefaultValueAssignments(node);
3333-
emitRestParameter(node);
3334-
if (node.body.kind !== SyntaxKind.Block && outPos === writer.getTextPos()) {
3335-
decreaseIndent();
3336-
write(" ");
3337-
emitStart(node.body);
3338-
write("return ");
3339-
3340-
// Don't emit comments on this body. We'll have already taken care of it above
3341-
// when we called emitDetachedComments.
3342-
emitNode(node.body, /*disableComments:*/ true);
3343-
emitEnd(node.body);
3344-
write(";");
3345-
emitTempDeclarations(/*newLine*/ false);
3346-
write(" ");
3347-
emitStart(node.body);
3348-
write("}");
3349-
emitEnd(node.body);
3350-
}
3351-
else {
3352-
if (node.body.kind === SyntaxKind.Block) {
3353-
emitLinesStartingAt((<Block>node.body).statements, startIndex);
3354-
}
3355-
else {
3356-
writeLine();
3357-
emitLeadingComments(node.body);
3358-
write("return ");
3359-
emit(node.body, /*disableComments:*/ true);
3360-
write(";");
3361-
emitTrailingComments(node.body);
3362-
}
3363-
emitTempDeclarations(/*newLine*/ true);
3364-
writeLine();
3365-
if (node.body.kind === SyntaxKind.Block) {
3366-
emitLeadingCommentsOfPosition((<Block>node.body).statements.end);
3367-
decreaseIndent();
3368-
emitToken(SyntaxKind.CloseBraceToken, (<Block>node.body).statements.end);
3369-
}
3370-
else {
3371-
decreaseIndent();
3372-
emitStart(node.body);
3373-
write("}");
3374-
emitEnd(node.body);
3375-
}
3376-
}
3377-
}
3318+
write("}");
3319+
}
3320+
else {
3321+
increaseIndent();
3322+
3323+
emitDetachedComments(node.body.kind === SyntaxKind.Block ? (<Block>node.body).statements : node.body);
3324+
3325+
var startIndex = 0;
3326+
if (node.body.kind === SyntaxKind.Block) {
3327+
startIndex = emitDirectivePrologues((<Block>node.body).statements, /*startWithNewLine*/ true);
3328+
}
3329+
var outPos = writer.getTextPos();
3330+
3331+
emitCaptureThisForNodeIfNecessary(node);
3332+
emitDefaultValueAssignments(node);
3333+
emitRestParameter(node);
3334+
if (node.body.kind !== SyntaxKind.Block && outPos === writer.getTextPos()) {
3335+
decreaseIndent();
3336+
write(" ");
3337+
emitStart(node.body);
3338+
write("return ");
3339+
3340+
// Don't emit comments on this body. We'll have already taken care of it above
3341+
// when we called emitDetachedComments.
3342+
emitNode(node.body, /*disableComments:*/ true);
3343+
emitEnd(node.body);
3344+
write(";");
3345+
emitTempDeclarations(/*newLine*/ false);
3346+
write(" ");
3347+
emitStart(node.body);
3348+
write("}");
3349+
emitEnd(node.body);
3350+
}
3351+
else {
3352+
if (node.body.kind === SyntaxKind.Block) {
3353+
emitLinesStartingAt((<Block>node.body).statements, startIndex);
3354+
}
3355+
else {
3356+
writeLine();
3357+
emitLeadingComments(node.body);
3358+
write("return ");
3359+
emit(node.body, /*disableComments:*/ true);
3360+
write(";");
3361+
emitTrailingComments(node.body);
3362+
}
3363+
emitTempDeclarations(/*newLine*/ true);
3364+
writeLine();
3365+
if (node.body.kind === SyntaxKind.Block) {
3366+
emitLeadingCommentsOfPosition((<Block>node.body).statements.end);
3367+
decreaseIndent();
3368+
emitToken(SyntaxKind.CloseBraceToken, (<Block>node.body).statements.end);
3369+
}
3370+
else {
3371+
decreaseIndent();
3372+
emitStart(node.body);
3373+
write("}");
3374+
emitEnd(node.body);
3375+
}
3376+
}
3377+
}
33783378

33793379
scopeEmitEnd();
33803380
if (node.flags & NodeFlags.Export) {
@@ -3725,9 +3725,9 @@ module ts {
37253725
write("[");
37263726
emitExpressionForPropertyName(node.name);
37273727
write("] = ");
3728-
writeEnumMemberDeclarationValue(node);
3728+
writeEnumMemberDeclarationValue(node);
37293729
write("] = ");
3730-
emitExpressionForPropertyName(node.name);
3730+
emitExpressionForPropertyName(node.name);
37313731
emitEnd(node);
37323732
write(";");
37333733
}

0 commit comments

Comments
 (0)