()
| 2603 | } |
| 2604 | |
| 2605 | parseTryStatement(): Node.TryStatement { |
| 2606 | const node = this.createNode(); |
| 2607 | this.expectKeyword('try'); |
| 2608 | |
| 2609 | const block = this.parseBlock(); |
| 2610 | const handler = this.matchKeyword('catch') ? this.parseCatchClause() : null; |
| 2611 | const finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null; |
| 2612 | |
| 2613 | if (!handler && !finalizer) { |
| 2614 | this.throwError(Messages.NoCatchOrFinally); |
| 2615 | } |
| 2616 | |
| 2617 | return this.finalize(node, new Node.TryStatement(block, handler, finalizer)); |
| 2618 | } |
| 2619 | |
| 2620 | // https://tc39.github.io/ecma262/#sec-debugger-statement |
| 2621 |
no test coverage detected