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

Function pushKeywordIf

test/fixtures/snapshot/typescript.js:135762–135772  ·  view source on GitHub ↗
(keywordList, token)

Source from the content-addressed store, hash-verified

135760 }
135761 }
135762 function pushKeywordIf(keywordList, token) {
135763 var expected = [];
135764 for (var _i = 2; _i < arguments.length; _i++) {
135765 expected[_i - 2] = arguments[_i];
135766 }
135767 if (token && ts.contains(expected, token.kind)) {
135768 keywordList.push(token);
135769 return true;
135770 }
135771 return false;
135772 }
135773 function getLoopBreakContinueOccurrences(loopNode) {
135774 var keywords = [];
135775 if (pushKeywordIf(keywords, loopNode.getFirstToken(), 97 /* SyntaxKind.ForKeyword */, 115 /* SyntaxKind.WhileKeyword */, 90 /* SyntaxKind.DoKeyword */)) {

Callers 6

getYieldOccurrencesFunction · 0.85
getIfElseKeywordsFunction · 0.85

Calls 2

containsMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected