@@ -1097,6 +1097,7 @@ var __param = this.__param || function(index, decorator) { return function (targ
10971097 default :
10981098 return Comparison . LessThan ;
10991099 }
1100+ case SyntaxKind . YieldExpression :
11001101 case SyntaxKind . ConditionalExpression :
11011102 return Comparison . LessThan ;
11021103 default :
@@ -1305,6 +1306,17 @@ var __param = this.__param || function(index, decorator) { return function (targ
13051306 emit ( ( < SpreadElementExpression > node ) . expression ) ;
13061307 }
13071308
1309+ function emitYieldExpression ( node : YieldExpression ) {
1310+ write ( tokenToString ( SyntaxKind . YieldKeyword ) ) ;
1311+ if ( node . asteriskToken ) {
1312+ write ( "*" ) ;
1313+ }
1314+ if ( node . expression ) {
1315+ write ( " " ) ;
1316+ emit ( node . expression ) ;
1317+ }
1318+ }
1319+
13081320 function needsParenthesisForPropertyAccessOrInvocation ( node : Expression ) {
13091321 switch ( node . kind ) {
13101322 case SyntaxKind . Identifier :
@@ -1601,6 +1613,10 @@ var __param = this.__param || function(index, decorator) { return function (targ
16011613 }
16021614
16031615 function emitMethod ( node : MethodDeclaration ) {
1616+ if ( languageVersion >= ScriptTarget . ES6 && node . asteriskToken ) {
1617+ write ( "*" ) ;
1618+ }
1619+
16041620 emit ( node . name , /*allowGeneratedIdentifiers*/ false ) ;
16051621 if ( languageVersion < ScriptTarget . ES6 ) {
16061622 write ( ": function " ) ;
@@ -2960,7 +2976,12 @@ var __param = this.__param || function(index, decorator) { return function (targ
29602976 write ( "default " ) ;
29612977 }
29622978 }
2963- write ( "function " ) ;
2979+
2980+ write ( "function" ) ;
2981+ if ( languageVersion >= ScriptTarget . ES6 && node . asteriskToken ) {
2982+ write ( "*" ) ;
2983+ }
2984+ write ( " " ) ;
29642985 }
29652986
29662987 if ( shouldEmitFunctionName ( node ) ) {
@@ -3344,6 +3365,9 @@ var __param = this.__param || function(index, decorator) { return function (targ
33443365 else if ( member . kind === SyntaxKind . SetAccessor ) {
33453366 write ( "set " ) ;
33463367 }
3368+ if ( ( < MethodDeclaration > member ) . asteriskToken ) {
3369+ write ( "*" ) ;
3370+ }
33473371 emit ( ( < MethodDeclaration > member ) . name ) ;
33483372 emitSignatureAndBody ( < MethodDeclaration > member ) ;
33493373 emitEnd ( member ) ;
@@ -4922,6 +4946,8 @@ var __param = this.__param || function(index, decorator) { return function (targ
49224946 return emitConditionalExpression ( < ConditionalExpression > node ) ;
49234947 case SyntaxKind . SpreadElementExpression :
49244948 return emitSpreadElementExpression ( < SpreadElementExpression > node ) ;
4949+ case SyntaxKind . YieldExpression :
4950+ return emitYieldExpression ( < YieldExpression > node ) ;
49254951 case SyntaxKind . OmittedExpression :
49264952 return ;
49274953 case SyntaxKind . Block :
0 commit comments