@@ -3315,66 +3315,66 @@ module ts {
3315
3315
3316
3316
if ( ! node . body ) {
3317
3317
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
+ }
3378
3378
3379
3379
scopeEmitEnd ( ) ;
3380
3380
if ( node . flags & NodeFlags . Export ) {
@@ -3725,9 +3725,9 @@ module ts {
3725
3725
write ( "[" ) ;
3726
3726
emitExpressionForPropertyName ( node . name ) ;
3727
3727
write ( "] = " ) ;
3728
- writeEnumMemberDeclarationValue ( node ) ;
3728
+ writeEnumMemberDeclarationValue ( node ) ;
3729
3729
write ( "] = " ) ;
3730
- emitExpressionForPropertyName ( node . name ) ;
3730
+ emitExpressionForPropertyName ( node . name ) ;
3731
3731
emitEnd ( node ) ;
3732
3732
write ( ";" ) ;
3733
3733
}
0 commit comments