()
| 1495 | } |
| 1496 | |
| 1497 | func (p *Parser) parseCatchClause() *ast.Node { |
| 1498 | pos := p.nodePos() |
| 1499 | p.parseExpected(ast.KindCatchKeyword) |
| 1500 | var variableDeclaration *ast.Node |
| 1501 | if p.parseOptional(ast.KindOpenParenToken) { |
| 1502 | variableDeclaration = p.parseVariableDeclaration() |
| 1503 | p.parseExpected(ast.KindCloseParenToken) |
| 1504 | } |
| 1505 | block := p.parseBlock(false /*ignoreMissingOpenBrace*/, nil) |
| 1506 | result := p.finishNode(p.factory.NewCatchClause(variableDeclaration, block), pos) |
| 1507 | return result |
| 1508 | } |
| 1509 | |
| 1510 | func (p *Parser) parseDebuggerStatement() *ast.Node { |
| 1511 | pos := p.nodePos() |
no test coverage detected