MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / validCortex

Function validCortex

test/utils.ts:331–335  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

329
330export function validEpsil(s: string): Expression | null {
331 const [value, errors] = parseEpsil(s);
332 if (errors && errors.length > 0) return formatError(errors);
333 expect(operator(value)).toBe('Program');
334 // Grammar tests compare a single statement's payload. Multiple statements
335 // retain their Program container; Program cardinalities are tested separately.
336 return strip(operands(value).length === 1 ? operand(value, 1)! : value);
337}
338

Callers 1

Calls 3

parseCortexFunction · 0.90
formatErrorFunction · 0.85
stripFunction · 0.85

Tested by

no test coverage detected