MCPcopy Create free account
hub / github.com/codemix/graph / isSimpleOrChain

Function isSimpleOrChain

packages/graph/src/grammar.js:18247–18253  ·  view source on GitHub ↗
(expr)

Source from the content-addressed store, hash-verified

18245
18246 // Helper to check if a LabelOr chain is just simple labels (no AND, NOT, wildcard)
18247 function isSimpleOrChain(expr) {
18248 if (expr.type === 'LabelName') return true;
18249 if (expr.type === 'LabelOr') {
18250 return isSimpleOrChain(expr.left) && isSimpleOrChain(expr.right);
18251 }
18252 return false;
18253 }
18254
18255 // Flatten simple OR chain to array of label names
18256 function flattenSimpleOrChain(expr) {

Callers 1

peg$f125Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected