()
| 34473 | return !scanner.hasPrecedingLineBreak() && isIdentifier(); |
| 34474 | } |
| 34475 | function parseYieldExpression() { |
| 34476 | var pos = getNodePos(); |
| 34477 | // YieldExpression[In] : |
| 34478 | // yield |
| 34479 | // yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] |
| 34480 | // yield [no LineTerminator here] * [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] |
| 34481 | nextToken(); |
| 34482 | if (!scanner.hasPrecedingLineBreak() && |
| 34483 | (token() === 41 /* SyntaxKind.AsteriskToken */ || isStartOfExpression())) { |
| 34484 | return finishNode(factory.createYieldExpression(parseOptionalToken(41 /* SyntaxKind.AsteriskToken */), parseAssignmentExpressionOrHigher()), pos); |
| 34485 | } |
| 34486 | else { |
| 34487 | // if the next token is not on the same line as yield. or we don't have an '*' or |
| 34488 | // the start of an expression, then this is just a simple "yield" expression. |
| 34489 | return finishNode(factory.createYieldExpression(/*asteriskToken*/ undefined, /*expression*/ undefined), pos); |
| 34490 | } |
| 34491 | } |
| 34492 | function parseSimpleArrowFunctionExpression(pos, identifier, asyncModifier) { |
| 34493 | ts.Debug.assert(token() === 38 /* SyntaxKind.EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); |
| 34494 | var parameter = factory.createParameterDeclaration( |
no test coverage detected
searching dependent graphs…