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

Function isStatementCondition

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

Source from the content-addressed store, hash-verified

45486 return flow;
45487 }
45488 function isStatementCondition(node) {
45489 var parent = node.parent;
45490 switch (parent.kind) {
45491 case 239 /* SyntaxKind.IfStatement */:
45492 case 241 /* SyntaxKind.WhileStatement */:
45493 case 240 /* SyntaxKind.DoStatement */:
45494 return parent.expression === node;
45495 case 242 /* SyntaxKind.ForStatement */:
45496 case 222 /* SyntaxKind.ConditionalExpression */:
45497 return parent.condition === node;
45498 }
45499 return false;
45500 }
45501 function isLogicalExpression(node) {
45502 while (true) {
45503 if (node.kind === 212 /* SyntaxKind.ParenthesizedExpression */) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected