MCPcopy Index your code
hub / github.com/nodejs/node / traverse

Function traverse

test/fixtures/snapshot/typescript.js:15623–15644  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

15621 function forEachReturnStatement(body, visitor) {
15622 return traverse(body);
15623 function traverse(node) {
15624 switch (node.kind) {
15625 case 247 /* SyntaxKind.ReturnStatement */:
15626 return visitor(node);
15627 case 263 /* SyntaxKind.CaseBlock */:
15628 case 235 /* SyntaxKind.Block */:
15629 case 239 /* SyntaxKind.IfStatement */:
15630 case 240 /* SyntaxKind.DoStatement */:
15631 case 241 /* SyntaxKind.WhileStatement */:
15632 case 242 /* SyntaxKind.ForStatement */:
15633 case 243 /* SyntaxKind.ForInStatement */:
15634 case 244 /* SyntaxKind.ForOfStatement */:
15635 case 248 /* SyntaxKind.WithStatement */:
15636 case 249 /* SyntaxKind.SwitchStatement */:
15637 case 289 /* SyntaxKind.CaseClause */:
15638 case 290 /* SyntaxKind.DefaultClause */:
15639 case 250 /* SyntaxKind.LabeledStatement */:
15640 case 252 /* SyntaxKind.TryStatement */:
15641 case 292 /* SyntaxKind.CatchClause */:
15642 return ts.forEachChild(node, traverse);
15643 }
15644 }
15645 }
15646 ts.forEachReturnStatement = forEachReturnStatement;
15647 function forEachYieldExpression(body, visitor) {

Callers 4

forEachReturnStatementFunction · 0.85
forEachYieldExpressionFunction · 0.85
traverseInDepthMethod · 0.85

Calls 4

isPartOfTypeNodeFunction · 0.85
getReferencedValueSymbolFunction · 0.85
forEachChildMethod · 0.80
visitorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…