MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / processNode

Function processNode

ui/plugins/ui/jasmine/jasmine.js:9631–9683  ·  view source on GitHub ↗
(node, parentExcluded)

Source from the content-addressed store, hash-verified

9629 }
9630
9631 function processNode(node, parentExcluded) {
9632 const executableIndex = runnableIndex(node.id)
9633
9634 if (executableIndex !== undefined) {
9635 parentExcluded = false
9636 }
9637
9638 if (!node.children) {
9639 const excluded = parentExcluded || excludeNode(node)
9640 stats[node.id] = {
9641 excluded: excluded,
9642 willExecute: !excluded && !node.markedPending,
9643 segments: [
9644 {
9645 index: 0,
9646 owner: node,
9647 nodes: [node],
9648 min: startingMin(executableIndex),
9649 max: startingMax(executableIndex),
9650 },
9651 ],
9652 }
9653 } else {
9654 let hasExecutableChild = false
9655
9656 const orderedChildren = orderChildren(node)
9657
9658 for (let i = 0; i < orderedChildren.length; i++) {
9659 const child = orderedChildren[i]
9660
9661 processNode(child, parentExcluded)
9662
9663 if (!stats.valid) {
9664 return
9665 }
9666
9667 const childStats = stats[child.id]
9668
9669 hasExecutableChild = hasExecutableChild || childStats.willExecute
9670 }
9671
9672 stats[node.id] = {
9673 excluded: parentExcluded,
9674 willExecute: hasExecutableChild,
9675 }
9676
9677 segmentChildren(node, orderedChildren, stats[node.id], executableIndex)
9678
9679 if (!node.canBeReentered() && stats[node.id].segments.length > 1) {
9680 stats = { valid: false }
9681 }
9682 }
9683 }
9684
9685 function startingMin(executableIndex) {
9686 return executableIndex === undefined ? defaultMin : executableIndex

Callers 1

TreeProcessorFunction · 0.85

Calls 4

runnableIndexFunction · 0.85
startingMinFunction · 0.85
startingMaxFunction · 0.85
segmentChildrenFunction · 0.85

Tested by

no test coverage detected