/** * A Look condition as the emitter will key it: the lowered atom each term * becomes, the scope key a whole condition folds to, and what a module's Look * declarations contribute to a property once every branch is read. * * D115 P4 R3a: the duplicate-property scope and the cascade both ask this, and * neither asks it of the analyzer's state, so it is written once here. */ import { type Expression, type Program } from "@velarscript/compiler/extension"; import { type WebLookExpression } from "../ast.ts"; import { type LookStaticValue } from "../look-static.ts"; /** * VEL5045: the selector/runtime terms one Look condition may expand to. A * conjunction multiplies its two sides, so nesting is what the cap is against. * Both readings of a condition stop there — the terms folded below, and the * count `look-sites.ts` takes — so neither can run away on a written nesting. */ export declare const LOOK_CONDITION_TERM_LIMIT = 32; /** * One Look condition as the set of alternatives it lowers to, each alternative * being the sorted atoms that must hold together. Two conditions share a * duplicate-detection scope exactly when this rendering matches, so a condition * written the other way round, negated into its complement, or spelled with its * operands swapped lands in the scope its rule will actually occupy. */ export declare function lookConditionKey(expression: Expression, negated: boolean, staticValues: ReadonlyMap): string; /** * Every `const name = look:` in the module, wherever it is written. A name * declared twice maps to null: two different Look literals under one name make * the composition question unanswerable, so the check that reads this map * declines rather than guessing which one an element received. */ export declare function collectLookDeclarations(program: Program): ReadonlyMap; /** * The properties one Look sets, each keyed by the target it sets them on so a * `@before:` colour and an element colour stay two different decisions. The * condition is deliberately not part of the key: two looks that set one * property under conditions that can both hold are exactly the ambiguity this * serves. A `...spread` of another look is followed, and the names followed are * reported back, because composing is what makes two looks ordered rather than * independent. */ export declare function lookContributions(look: WebLookExpression, looks: ReadonlyMap, visited?: ReadonlySet): { readonly properties: ReadonlySet; readonly composed: ReadonlySet; }; //# sourceMappingURL=look-conditions.d.ts.map