MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / getCollectionPredicateContext

Function getCollectionPredicateContext

packages/language/src/zmodel-scope.ts:302–311  ·  view source on GitHub ↗
(node: AstNode)

Source from the content-addressed store, hash-verified

300}
301
302function getCollectionPredicateContext(node: AstNode) {
303 let curr: AstNode | undefined = node;
304 while (curr) {
305 if (curr.$container && isCollectionPredicate(curr.$container) && curr.$containerProperty === 'right') {
306 return curr.$container;
307 }
308 curr = curr.$container;
309 }
310 return undefined;
311}

Callers 1

getScopeMethod · 0.85

Calls 1

isCollectionPredicateFunction · 0.90

Tested by

no test coverage detected