MCPcopy Index your code
hub / github.com/BloombergGraphics/whatiscode / parseCatchClause

Function parseCatchClause

scripts/libs/esprima.js:3772–3792  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3770 // 12.14 The try statement
3771
3772 function parseCatchClause() {
3773 var param, body, node = new Node();
3774
3775 expectKeyword('catch');
3776
3777 expect('(');
3778 if (match(')')) {
3779 throwUnexpectedToken(lookahead);
3780 }
3781
3782 param = parsePattern();
3783
3784 // 12.14.1
3785 if (strict && isRestrictedWord(param.name)) {
3786 tolerateError(Messages.StrictCatchVariable);
3787 }
3788
3789 expect(')');
3790 body = parseBlock();
3791 return node.finishCatchClause(param, body);
3792 }
3793
3794 function parseTryStatement(node) {
3795 var block, handler = null, finalizer = null;

Callers 1

parseTryStatementFunction · 0.85

Calls 8

expectKeywordFunction · 0.85
expectFunction · 0.85
matchFunction · 0.85
throwUnexpectedTokenFunction · 0.85
parsePatternFunction · 0.85
isRestrictedWordFunction · 0.85
tolerateErrorFunction · 0.85
parseBlockFunction · 0.85

Tested by

no test coverage detected