()
| 36022 | return withJSDoc(finishNode(factory.createSwitchStatement(expression, caseBlock), pos), hasJSDoc); |
| 36023 | } |
| 36024 | function parseThrowStatement() { |
| 36025 | // ThrowStatement[Yield] : |
| 36026 | // throw [no LineTerminator here]Expression[In, ?Yield]; |
| 36027 | var pos = getNodePos(); |
| 36028 | var hasJSDoc = hasPrecedingJSDocComment(); |
| 36029 | parseExpected(109 /* SyntaxKind.ThrowKeyword */); |
| 36030 | // Because of automatic semicolon insertion, we need to report error if this |
| 36031 | // throw could be terminated with a semicolon. Note: we can't call 'parseExpression' |
| 36032 | // directly as that might consume an expression on the following line. |
| 36033 | // Instead, we create a "missing" identifier, but don't report an error. The actual error |
| 36034 | // will be reported in the grammar walker. |
| 36035 | var expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); |
| 36036 | if (expression === undefined) { |
| 36037 | identifierCount++; |
| 36038 | expression = finishNode(factory.createIdentifier(""), getNodePos()); |
| 36039 | } |
| 36040 | if (!tryParseSemicolon()) { |
| 36041 | parseErrorForMissingSemicolonAfter(expression); |
| 36042 | } |
| 36043 | return withJSDoc(finishNode(factory.createThrowStatement(expression), pos), hasJSDoc); |
| 36044 | } |
| 36045 | // TODO: Review for error recovery |
| 36046 | function parseTryStatement() { |
| 36047 | var pos = getNodePos(); |
no test coverage detected
searching dependent graphs…