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

Function checkForStatement

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

Source from the content-addressed store, hash-verified

82815 return checkTruthinessOfType(checkExpression(node, checkMode), node);
82816 }
82817 function checkForStatement(node) {
82818 // Grammar checking
82819 if (!checkGrammarStatementInAmbientContext(node)) {
82820 if (node.initializer && node.initializer.kind === 255 /* SyntaxKind.VariableDeclarationList */) {
82821 checkGrammarVariableDeclarationList(node.initializer);
82822 }
82823 }
82824 if (node.initializer) {
82825 if (node.initializer.kind === 255 /* SyntaxKind.VariableDeclarationList */) {
82826 ts.forEach(node.initializer.declarations, checkVariableDeclaration);
82827 }
82828 else {
82829 checkExpression(node.initializer);
82830 }
82831 }
82832 if (node.condition)
82833 checkTruthinessExpression(node.condition);
82834 if (node.incrementor)
82835 checkExpression(node.incrementor);
82836 checkSourceElement(node.statement);
82837 if (node.locals) {
82838 registerForUnusedIdentifiersCheck(node);
82839 }
82840 }
82841 function checkForOfStatement(node) {
82842 checkGrammarForInOrForOfStatement(node);
82843 var container = ts.getContainingFunctionOrClassStaticBlock(node);

Callers 1

checkSourceElementWorkerFunction · 0.85

Calls 7

checkSourceElementFunction · 0.85
checkExpressionFunction · 0.70
forEachMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…