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

Function bindChildren

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

Source from the content-addressed store, hash-verified

45212 ts.forEachChild(node, bind, bindEach);
45213 }
45214 function bindChildren(node) {
45215 var saveInAssignmentPattern = inAssignmentPattern;
45216 // Most nodes aren't valid in an assignment pattern, so we clear the value here
45217 // and set it before we descend into nodes that could actually be part of an assignment pattern.
45218 inAssignmentPattern = false;
45219 if (checkUnreachable(node)) {
45220 bindEachChild(node);
45221 bindJSDoc(node);
45222 inAssignmentPattern = saveInAssignmentPattern;
45223 return;
45224 }
45225 if (node.kind >= 237 /* SyntaxKind.FirstStatement */ && node.kind <= 253 /* SyntaxKind.LastStatement */ && !options.allowUnreachableCode) {
45226 node.flowNode = currentFlow;
45227 }
45228 switch (node.kind) {
45229 case 241 /* SyntaxKind.WhileStatement */:
45230 bindWhileStatement(node);
45231 break;
45232 case 240 /* SyntaxKind.DoStatement */:
45233 bindDoStatement(node);
45234 break;
45235 case 242 /* SyntaxKind.ForStatement */:
45236 bindForStatement(node);
45237 break;
45238 case 243 /* SyntaxKind.ForInStatement */:
45239 case 244 /* SyntaxKind.ForOfStatement */:
45240 bindForInOrForOfStatement(node);
45241 break;
45242 case 239 /* SyntaxKind.IfStatement */:
45243 bindIfStatement(node);
45244 break;
45245 case 247 /* SyntaxKind.ReturnStatement */:
45246 case 251 /* SyntaxKind.ThrowStatement */:
45247 bindReturnOrThrow(node);
45248 break;
45249 case 246 /* SyntaxKind.BreakStatement */:
45250 case 245 /* SyntaxKind.ContinueStatement */:
45251 bindBreakOrContinueStatement(node);
45252 break;
45253 case 252 /* SyntaxKind.TryStatement */:
45254 bindTryStatement(node);
45255 break;
45256 case 249 /* SyntaxKind.SwitchStatement */:
45257 bindSwitchStatement(node);
45258 break;
45259 case 263 /* SyntaxKind.CaseBlock */:
45260 bindCaseBlock(node);
45261 break;
45262 case 289 /* SyntaxKind.CaseClause */:
45263 bindCaseClause(node);
45264 break;
45265 case 238 /* SyntaxKind.ExpressionStatement */:
45266 bindExpressionStatement(node);
45267 break;
45268 case 250 /* SyntaxKind.LabeledStatement */:
45269 bindLabeledStatement(node);
45270 break;
45271 case 219 /* SyntaxKind.PrefixUnaryExpression */:

Callers 2

bindContainerFunction · 0.85
bindFunction · 0.85

Calls 15

checkUnreachableFunction · 0.85
bindEachChildFunction · 0.85
bindJSDocFunction · 0.85
bindWhileStatementFunction · 0.85
bindDoStatementFunction · 0.85
bindForStatementFunction · 0.85
bindIfStatementFunction · 0.85
bindReturnOrThrowFunction · 0.85
bindTryStatementFunction · 0.85
bindSwitchStatementFunction · 0.85

Tested by

no test coverage detected