MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / checkBudget

Function checkBudget

source code/utils/bash/bashParser.ts:649–659  ·  view source on GitHub ↗
(P: ParseState)

Source from the content-addressed store, hash-verified

647}
648
649function checkBudget(P: ParseState): void {
650 P.nodeCount++
651 if (P.nodeCount > MAX_NODES) {
652 P.aborted = true
653 throw new Error('budget')
654 }
655 if ((P.nodeCount & 0x7f) === 0 && performance.now() > P.deadline) {
656 P.aborted = true
657 throw new Error('timeout')
658 }
659}
660
661/** Build a node. Slices text from source by byte range via char-index lookup. */
662function mk(

Callers 1

mkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected