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

Function getBreakOrContinueStatementOccurrences

test/fixtures/snapshot/typescript.js:135793–135808  ·  view source on GitHub ↗
(breakOrContinueStatement)

Source from the content-addressed store, hash-verified

135791 return keywords;
135792 }
135793 function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) {
135794 var owner = getBreakOrContinueOwner(breakOrContinueStatement);
135795 if (owner) {
135796 switch (owner.kind) {
135797 case 242 /* SyntaxKind.ForStatement */:
135798 case 243 /* SyntaxKind.ForInStatement */:
135799 case 244 /* SyntaxKind.ForOfStatement */:
135800 case 240 /* SyntaxKind.DoStatement */:
135801 case 241 /* SyntaxKind.WhileStatement */:
135802 return getLoopBreakContinueOccurrences(owner);
135803 case 249 /* SyntaxKind.SwitchStatement */:
135804 return getSwitchCaseDefaultOccurrences(owner);
135805 }
135806 }
135807 return undefined;
135808 }
135809 function getSwitchCaseDefaultOccurrences(switchStatement) {
135810 var keywords = [];
135811 pushKeywordIf(keywords, switchStatement.getFirstToken(), 107 /* SyntaxKind.SwitchKeyword */);

Callers

nothing calls this directly

Tested by

no test coverage detected