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

Function parseTryStatement

scripts/libs/esprima.js:3794–3815  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

3792 }
3793
3794 function parseTryStatement(node) {
3795 var block, handler = null, finalizer = null;
3796
3797 expectKeyword('try');
3798
3799 block = parseBlock();
3800
3801 if (matchKeyword('catch')) {
3802 handler = parseCatchClause();
3803 }
3804
3805 if (matchKeyword('finally')) {
3806 lex();
3807 finalizer = parseBlock();
3808 }
3809
3810 if (!handler && !finalizer) {
3811 throwError(Messages.NoCatchOrFinally);
3812 }
3813
3814 return node.finishTryStatement(block, handler, finalizer);
3815 }
3816
3817 // 12.15 The debugger statement
3818

Callers 1

parseStatementFunction · 0.85

Calls 6

expectKeywordFunction · 0.85
parseBlockFunction · 0.85
matchKeywordFunction · 0.85
parseCatchClauseFunction · 0.85
lexFunction · 0.85
throwErrorFunction · 0.85

Tested by

no test coverage detected