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

Function topLevelNestedVisitor

test/fixtures/snapshot/typescript.js:106717–106760  ·  view source on GitHub ↗

* Visit nested elements at the top-level of a module. * * @param node The node to visit.

(node)

Source from the content-addressed store, hash-verified

106715 * @param node The node to visit.
106716 */
106717 function topLevelNestedVisitor(node) {
106718 switch (node.kind) {
106719 case 237 /* SyntaxKind.VariableStatement */:
106720 return visitVariableStatement(node);
106721 case 256 /* SyntaxKind.FunctionDeclaration */:
106722 return visitFunctionDeclaration(node);
106723 case 257 /* SyntaxKind.ClassDeclaration */:
106724 return visitClassDeclaration(node);
106725 case 242 /* SyntaxKind.ForStatement */:
106726 return visitForStatement(node, /*isTopLevel*/ true);
106727 case 243 /* SyntaxKind.ForInStatement */:
106728 return visitForInStatement(node);
106729 case 244 /* SyntaxKind.ForOfStatement */:
106730 return visitForOfStatement(node);
106731 case 240 /* SyntaxKind.DoStatement */:
106732 return visitDoStatement(node);
106733 case 241 /* SyntaxKind.WhileStatement */:
106734 return visitWhileStatement(node);
106735 case 250 /* SyntaxKind.LabeledStatement */:
106736 return visitLabeledStatement(node);
106737 case 248 /* SyntaxKind.WithStatement */:
106738 return visitWithStatement(node);
106739 case 249 /* SyntaxKind.SwitchStatement */:
106740 return visitSwitchStatement(node);
106741 case 263 /* SyntaxKind.CaseBlock */:
106742 return visitCaseBlock(node);
106743 case 289 /* SyntaxKind.CaseClause */:
106744 return visitCaseClause(node);
106745 case 290 /* SyntaxKind.DefaultClause */:
106746 return visitDefaultClause(node);
106747 case 252 /* SyntaxKind.TryStatement */:
106748 return visitTryStatement(node);
106749 case 292 /* SyntaxKind.CatchClause */:
106750 return visitCatchClause(node);
106751 case 235 /* SyntaxKind.Block */:
106752 return visitBlock(node);
106753 case 352 /* SyntaxKind.MergeDeclarationMarker */:
106754 return visitMergeDeclarationMarker(node);
106755 case 353 /* SyntaxKind.EndOfDeclarationMarker */:
106756 return visitEndOfDeclarationMarker(node);
106757 default:
106758 return visitor(node);
106759 }
106760 }
106761 /**
106762 * Visits the body of a ForStatement to hoist declarations.
106763 *

Callers 1

topLevelVisitorFunction · 0.85

Calls 15

visitVariableStatementFunction · 0.85
visitFunctionDeclarationFunction · 0.85
visitClassDeclarationFunction · 0.85
visitForStatementFunction · 0.85
visitForInStatementFunction · 0.85
visitForOfStatementFunction · 0.85
visitDoStatementFunction · 0.85
visitWhileStatementFunction · 0.85
visitLabeledStatementFunction · 0.85
visitWithStatementFunction · 0.85
visitSwitchStatementFunction · 0.85
visitCaseBlockFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…