()
| 36081 | return withJSDoc(finishNode(factory.createDebuggerStatement(), pos), hasJSDoc); |
| 36082 | } |
| 36083 | function parseExpressionOrLabeledStatement() { |
| 36084 | // Avoiding having to do the lookahead for a labeled statement by just trying to parse |
| 36085 | // out an expression, seeing if it is identifier and then seeing if it is followed by |
| 36086 | // a colon. |
| 36087 | var pos = getNodePos(); |
| 36088 | var hasJSDoc = hasPrecedingJSDocComment(); |
| 36089 | var node; |
| 36090 | var hasParen = token() === 20 /* SyntaxKind.OpenParenToken */; |
| 36091 | var expression = allowInAnd(parseExpression); |
| 36092 | if (ts.isIdentifier(expression) && parseOptional(58 /* SyntaxKind.ColonToken */)) { |
| 36093 | node = factory.createLabeledStatement(expression, parseStatement()); |
| 36094 | } |
| 36095 | else { |
| 36096 | if (!tryParseSemicolon()) { |
| 36097 | parseErrorForMissingSemicolonAfter(expression); |
| 36098 | } |
| 36099 | node = factory.createExpressionStatement(expression); |
| 36100 | if (hasParen) { |
| 36101 | // do not parse the same jsdoc twice |
| 36102 | hasJSDoc = false; |
| 36103 | } |
| 36104 | } |
| 36105 | return withJSDoc(finishNode(node, pos), hasJSDoc); |
| 36106 | } |
| 36107 | function nextTokenIsIdentifierOrKeywordOnSameLine() { |
| 36108 | nextToken(); |
| 36109 | return ts.tokenIsIdentifierOrKeyword(token()) && !scanner.hasPrecedingLineBreak(); |
no test coverage detected
searching dependent graphs…