MCPcopy Create free account
hub / github.com/nodejs/node / getTryCatchFinallyOccurrences

Function getTryCatchFinallyOccurrences

test/fixtures/snapshot/typescript.js:135823–135834  ·  view source on GitHub ↗
(tryStatement, sourceFile)

Source from the content-addressed store, hash-verified

135821 return keywords;
135822 }
135823 function getTryCatchFinallyOccurrences(tryStatement, sourceFile) {
135824 var keywords = [];
135825 pushKeywordIf(keywords, tryStatement.getFirstToken(), 111 /* SyntaxKind.TryKeyword */);
135826 if (tryStatement.catchClause) {
135827 pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 83 /* SyntaxKind.CatchKeyword */);
135828 }
135829 if (tryStatement.finallyBlock) {
135830 var finallyKeyword = ts.findChildOfKind(tryStatement, 96 /* SyntaxKind.FinallyKeyword */, sourceFile);
135831 pushKeywordIf(keywords, finallyKeyword, 96 /* SyntaxKind.FinallyKeyword */);
135832 }
135833 return keywords;
135834 }
135835 function getThrowOccurrences(throwStatement, sourceFile) {
135836 var owner = getThrowStatementOwner(throwStatement);
135837 if (!owner) {

Callers

nothing calls this directly

Calls 1

pushKeywordIfFunction · 0.85

Tested by

no test coverage detected