MCPcopy Index your code
hub / github.com/codeaashu/claude-code / walk

Function walk

src/utils/bash/treeSitterAnalysis.ts:424–440  ·  view source on GitHub ↗
(node: TreeSitterNode)

Source from the content-addressed store, hash-verified

422 const n = rootNode as TreeSitterNode
423
424 function walk(node: TreeSitterNode): boolean {
425 // Check for operator types that indicate compound commands
426 if (node.type === ';' || node.type === '&&' || node.type === '||') {
427 // Verify this is a child of a list or program, not inside a command
428 return true
429 }
430
431 if (node.type === 'list') {
432 // A list node means there are compound operators
433 return true
434 }
435
436 for (const child of node.children) {
437 if (child && walk(child)) return true
438 }
439 return false
440 }
441
442 return walk(n)
443}

Callers 2

hasActualOperatorNodesFunction · 0.70
extractDangerousPatternsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected