MCPcopy Create free account
hub / github.com/dchester/jsonpath / parseCatchClause

Function parseCatchClause

jsonpath.js:3147–3167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3145 // 12.14 The try statement
3146
3147 function parseCatchClause() {
3148 var param, body, startToken;
3149
3150 startToken = lookahead;
3151 expectKeyword('catch');
3152
3153 expect('(');
3154 if (match(')')) {
3155 throwUnexpected(lookahead);
3156 }
3157
3158 param = parseVariableIdentifier();
3159 // 12.14.1
3160 if (strict && isRestrictedWord(param.name)) {
3161 throwErrorTolerant({}, Messages.StrictCatchVariable);
3162 }
3163
3164 expect(')');
3165 body = parseBlock();
3166 return delegate.markEnd(delegate.createCatchClause(param, body), startToken);
3167 }
3168
3169 function parseTryStatement() {
3170 var block, handlers = [], finalizer = null;

Callers 1

parseTryStatementFunction · 0.85

Calls 8

expectKeywordFunction · 0.85
expectFunction · 0.85
matchFunction · 0.85
throwUnexpectedFunction · 0.85
parseVariableIdentifierFunction · 0.85
isRestrictedWordFunction · 0.85
throwErrorTolerantFunction · 0.85
parseBlockFunction · 0.85

Tested by

no test coverage detected