From 350d768e8d352fd74a81bfae9a009e668e0461d6 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 2 Feb 2015 15:50:16 -0800 Subject: [PATCH] Fix usage of tabs instead of spaces. --- src/compiler/emitter.ts | 116 ++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 405cf2d8abe..86810e4d1d3 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3315,66 +3315,66 @@ module ts { if (!node.body) { writeLine(); - write("}"); - } - else { - increaseIndent(); + write("}"); + } + else { + increaseIndent(); - emitDetachedComments(node.body.kind === SyntaxKind.Block ? (node.body).statements : node.body); + emitDetachedComments(node.body.kind === SyntaxKind.Block ? (node.body).statements : node.body); - var startIndex = 0; - if (node.body.kind === SyntaxKind.Block) { - startIndex = emitDirectivePrologues((node.body).statements, /*startWithNewLine*/ true); - } - var outPos = writer.getTextPos(); + var startIndex = 0; + if (node.body.kind === SyntaxKind.Block) { + startIndex = emitDirectivePrologues((node.body).statements, /*startWithNewLine*/ true); + } + var outPos = writer.getTextPos(); - emitCaptureThisForNodeIfNecessary(node); - emitDefaultValueAssignments(node); - emitRestParameter(node); - if (node.body.kind !== SyntaxKind.Block && outPos === writer.getTextPos()) { - decreaseIndent(); - write(" "); - emitStart(node.body); - write("return "); + emitCaptureThisForNodeIfNecessary(node); + emitDefaultValueAssignments(node); + emitRestParameter(node); + if (node.body.kind !== SyntaxKind.Block && outPos === writer.getTextPos()) { + decreaseIndent(); + write(" "); + emitStart(node.body); + write("return "); - // Don't emit comments on this body. We'll have already taken care of it above - // when we called emitDetachedComments. - emitNode(node.body, /*disableComments:*/ true); - emitEnd(node.body); - write(";"); - emitTempDeclarations(/*newLine*/ false); - write(" "); - emitStart(node.body); - write("}"); - emitEnd(node.body); - } - else { - if (node.body.kind === SyntaxKind.Block) { - emitLinesStartingAt((node.body).statements, startIndex); - } - else { - writeLine(); - emitLeadingComments(node.body); - write("return "); - emit(node.body, /*disableComments:*/ true); - write(";"); - emitTrailingComments(node.body); - } - emitTempDeclarations(/*newLine*/ true); - writeLine(); - if (node.body.kind === SyntaxKind.Block) { - emitLeadingCommentsOfPosition((node.body).statements.end); - decreaseIndent(); - emitToken(SyntaxKind.CloseBraceToken, (node.body).statements.end); - } - else { - decreaseIndent(); - emitStart(node.body); - write("}"); - emitEnd(node.body); - } - } - } + // Don't emit comments on this body. We'll have already taken care of it above + // when we called emitDetachedComments. + emitNode(node.body, /*disableComments:*/ true); + emitEnd(node.body); + write(";"); + emitTempDeclarations(/*newLine*/ false); + write(" "); + emitStart(node.body); + write("}"); + emitEnd(node.body); + } + else { + if (node.body.kind === SyntaxKind.Block) { + emitLinesStartingAt((node.body).statements, startIndex); + } + else { + writeLine(); + emitLeadingComments(node.body); + write("return "); + emit(node.body, /*disableComments:*/ true); + write(";"); + emitTrailingComments(node.body); + } + emitTempDeclarations(/*newLine*/ true); + writeLine(); + if (node.body.kind === SyntaxKind.Block) { + emitLeadingCommentsOfPosition((node.body).statements.end); + decreaseIndent(); + emitToken(SyntaxKind.CloseBraceToken, (node.body).statements.end); + } + else { + decreaseIndent(); + emitStart(node.body); + write("}"); + emitEnd(node.body); + } + } + } scopeEmitEnd(); if (node.flags & NodeFlags.Export) { @@ -3725,9 +3725,9 @@ module ts { write("["); emitExpressionForPropertyName(node.name); write("] = "); - writeEnumMemberDeclarationValue(node); + writeEnumMemberDeclarationValue(node); write("] = "); - emitExpressionForPropertyName(node.name); + emitExpressionForPropertyName(node.name); emitEnd(node); write(";"); }