@@ -460,7 +460,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
460460 const { write, writeTextOfNode, writeLine, increaseIndent, decreaseIndent } = writer ;
461461
462462 const sourceMap = compilerOptions . sourceMap || compilerOptions . inlineSourceMap ? createSourceMapWriter ( host , writer ) : getNullSourceMapWriter ( ) ;
463- const { setSourceFile, emitStart, emitEnd, emitPos, pushScope : scopeEmitStart , popScope : scopeEmitEnd } = sourceMap ;
463+ const { setSourceFile, emitStart, emitEnd, emitPos, pushScope, popScope } = sourceMap ;
464464
465465 let currentSourceFile : SourceFile ;
466466 let currentText : string ;
@@ -2692,7 +2692,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
26922692
26932693 emitToken ( SyntaxKind . OpenBraceToken , node . pos ) ;
26942694 increaseIndent ( ) ;
2695- scopeEmitStart ( node . parent ) ;
2695+ pushScope ( node . parent ) ;
26962696 if ( node . kind === SyntaxKind . ModuleBlock ) {
26972697 Debug . assert ( node . parent . kind === SyntaxKind . ModuleDeclaration ) ;
26982698 emitCaptureThisForNodeIfNecessary ( node . parent ) ;
@@ -2704,7 +2704,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
27042704 decreaseIndent ( ) ;
27052705 writeLine ( ) ;
27062706 emitToken ( SyntaxKind . CloseBraceToken , node . statements . end ) ;
2707- scopeEmitEnd ( ) ;
2707+ popScope ( ) ;
27082708 }
27092709
27102710 function emitEmbeddedStatement ( node : Node ) {
@@ -4549,7 +4549,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
45494549
45504550 function emitDownLevelExpressionFunctionBody ( node : FunctionLikeDeclaration , body : Expression ) {
45514551 write ( " {" ) ;
4552- scopeEmitStart ( node ) ;
4552+ pushScope ( node ) ;
45534553
45544554 increaseIndent ( ) ;
45554555 const outPos = writer . getTextPos ( ) ;
@@ -4590,12 +4590,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
45904590 write ( "}" ) ;
45914591 emitEnd ( node . body ) ;
45924592
4593- scopeEmitEnd ( ) ;
4593+ popScope ( ) ;
45944594 }
45954595
45964596 function emitBlockFunctionBody ( node : FunctionLikeDeclaration , body : Block ) {
45974597 write ( " {" ) ;
4598- scopeEmitStart ( node ) ;
4598+ pushScope ( node ) ;
45994599
46004600 const initialTextPos = writer . getTextPos ( ) ;
46014601
@@ -4630,7 +4630,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
46304630 }
46314631
46324632 emitToken ( SyntaxKind . CloseBraceToken , body . statements . end ) ;
4633- scopeEmitEnd ( ) ;
4633+ popScope ( ) ;
46344634 }
46354635
46364636 function findInitialSuperCall ( ctor : ConstructorDeclaration ) : ExpressionStatement {
@@ -4916,7 +4916,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
49164916 let startIndex = 0 ;
49174917
49184918 write ( " {" ) ;
4919- scopeEmitStart ( node , "constructor" ) ;
4919+ pushScope ( node , "constructor" ) ;
49204920 increaseIndent ( ) ;
49214921 if ( ctor ) {
49224922 // Emit all the directive prologues (like "use strict"). These have to come before
@@ -4966,7 +4966,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
49664966 }
49674967 decreaseIndent ( ) ;
49684968 emitToken ( SyntaxKind . CloseBraceToken , ctor ? ( < Block > ctor . body ) . statements . end : node . members . end ) ;
4969- scopeEmitEnd ( ) ;
4969+ popScope ( ) ;
49704970 emitEnd ( < Node > ctor || node ) ;
49714971 if ( ctor ) {
49724972 emitTrailingComments ( ctor ) ;
@@ -5103,14 +5103,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
51035103
51045104 write ( " {" ) ;
51055105 increaseIndent ( ) ;
5106- scopeEmitStart ( node ) ;
5106+ pushScope ( node ) ;
51075107 writeLine ( ) ;
51085108 emitConstructor ( node , baseTypeNode ) ;
51095109 emitMemberFunctionsForES6AndHigher ( node ) ;
51105110 decreaseIndent ( ) ;
51115111 writeLine ( ) ;
51125112 emitToken ( SyntaxKind . CloseBraceToken , node . members . end ) ;
5113- scopeEmitEnd ( ) ;
5113+ popScope ( ) ;
51145114
51155115 // TODO(rbuckton): Need to go back to `let _a = class C {}` approach, removing the defineProperty call for now.
51165116
@@ -5197,7 +5197,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
51975197 tempParameters = undefined ;
51985198 computedPropertyNamesToGeneratedNames = undefined ;
51995199 increaseIndent ( ) ;
5200- scopeEmitStart ( node ) ;
5200+ pushScope ( node ) ;
52015201 if ( baseTypeNode ) {
52025202 writeLine ( ) ;
52035203 emitStart ( baseTypeNode ) ;
@@ -5230,7 +5230,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
52305230 decreaseIndent ( ) ;
52315231 writeLine ( ) ;
52325232 emitToken ( SyntaxKind . CloseBraceToken , node . members . end ) ;
5233- scopeEmitEnd ( ) ;
5233+ popScope ( ) ;
52345234 emitStart ( node ) ;
52355235 write ( ")(" ) ;
52365236 if ( baseTypeNode ) {
@@ -5792,12 +5792,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
57925792 emitEnd ( node . name ) ;
57935793 write ( ") {" ) ;
57945794 increaseIndent ( ) ;
5795- scopeEmitStart ( node ) ;
5795+ pushScope ( node ) ;
57965796 emitLines ( node . members ) ;
57975797 decreaseIndent ( ) ;
57985798 writeLine ( ) ;
57995799 emitToken ( SyntaxKind . CloseBraceToken , node . members . end ) ;
5800- scopeEmitEnd ( ) ;
5800+ popScope ( ) ;
58015801 write ( ")(" ) ;
58025802 emitModuleMemberName ( node ) ;
58035803 write ( " || (" ) ;
@@ -5921,15 +5921,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
59215921 else {
59225922 write ( "{" ) ;
59235923 increaseIndent ( ) ;
5924- scopeEmitStart ( node ) ;
5924+ pushScope ( node ) ;
59255925 emitCaptureThisForNodeIfNecessary ( node ) ;
59265926 writeLine ( ) ;
59275927 emit ( node . body ) ;
59285928 decreaseIndent ( ) ;
59295929 writeLine ( ) ;
59305930 const moduleBlock = < ModuleBlock > getInnerMostModuleDeclarationFromDottedModule ( node ) . body ;
59315931 emitToken ( SyntaxKind . CloseBraceToken , moduleBlock . statements . end ) ;
5932- scopeEmitEnd ( ) ;
5932+ popScope ( ) ;
59335933 }
59345934 write ( ")(" ) ;
59355935 // write moduleDecl = containingModule.m only if it is not exported es6 module member
0 commit comments