Have a node flag to indicate if a yield expression has a *.

This commit is contained in:
Cyrus Najmabadi 2014-11-25 01:11:58 -08:00
parent 8bbc4090ef
commit ce2e7fc5d5
2 changed files with 4 additions and 1 deletions

View file

@ -2186,7 +2186,9 @@ module ts {
if (!scanner.hasPrecedingLineBreak() &&
(token === SyntaxKind.AsteriskToken || isStartOfExpression())) {
parseOptional(SyntaxKind.AsteriskToken);
if (parseOptional(SyntaxKind.AsteriskToken)) {
node.flags = NodeFlags.YieldStar;
}
node.expression = parseAssignmentExpression();
return finishNode(node);

View file

@ -272,6 +272,7 @@ module ts {
Const = 0x00001000, // Variable declaration
OctalLiteral = 0x00002000,
Generator = 0x00004000,
YieldStar = 0x00008000,
Modifier = Export | Ambient | Public | Private | Protected | Static,
AccessibilityModifier = Public | Private | Protected,