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

Function aggregateChildData

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

Source from the content-addressed store, hash-verified

14506 }
14507 ts.containsParseError = containsParseError;
14508 function aggregateChildData(node) {
14509 if (!(node.flags & 1048576 /* NodeFlags.HasAggregatedChildData */)) {
14510 // A node is considered to contain a parse error if:
14511 // a) the parser explicitly marked that it had an error
14512 // b) any of it's children reported that it had an error.
14513 var thisNodeOrAnySubNodesHasError = ((node.flags & 131072 /* NodeFlags.ThisNodeHasError */) !== 0) ||
14514 ts.forEachChild(node, containsParseError);
14515 // If so, mark ourselves accordingly.
14516 if (thisNodeOrAnySubNodesHasError) {
14517 node.flags |= 524288 /* NodeFlags.ThisNodeOrAnySubNodesHasError */;
14518 }
14519 // Also mark that we've propagated the child information to this node. This way we can
14520 // always consult the bit directly on this node without needing to check its children
14521 // again.
14522 node.flags |= 1048576 /* NodeFlags.HasAggregatedChildData */;
14523 }
14524 }
14525 function getSourceFileOfNode(node) {
14526 while (node && node.kind !== 305 /* SyntaxKind.SourceFile */) {
14527 node = node.parent;

Callers 1

containsParseErrorFunction · 0.85

Calls 1

forEachChildMethod · 0.80

Tested by

no test coverage detected