MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / sameScope

Function sameScope

src/ui-server/api/program.ts:236–240  ·  view source on GitHub ↗
(open: Open, scope: Scope)

Source from the content-addressed store, hash-verified

234}
235
236function sameScope(open: Open, scope: Scope): boolean {
237 if (open.branch !== scope.branch) return false;
238 if (scope.kind === 'loop') return !open.fork;
239 return !!open.fork && open.armKey === armKey(scope.guard);
240}
241
242/** Open a construct: a bracketed loop, or a fork with the arm this site is in. */
243function openScope(into: WireBlock, scope: Scope): Open {

Callers 1

blockForFunction · 0.70

Calls 1

armKeyFunction · 0.85

Tested by

no test coverage detected