/** * Typing an expression, and working out the first bar it can produce a value * for. * * Every expression the pass reaches gets an answer recorded against it, and an * expression something was already reported about gets `unknown`, which * satisfies everything above it. That is what keeps one mistake to one * diagnostic: a trader with three mistakes sees three, and a trader with one * does not see the operator above it complaining as well. * * `language.md` sections 6 and 9 are the rules; the absence rules in particular * are not implemented anywhere else, and each one is cited where it is used. */ import type { Expression } from '../ast/index.js'; import type { Checker, Placement } from './checker.js'; import type { Type } from './types.js'; /** * An expression, and the answer to whether it may stand where it was written. * * A declaration handle is the one type that is not a value (`language.md` 5.4), * so the type the pass works out is checked against the closed list of places * one may be written before it is handed to the rule above. Refusing here * rather than at each consumer is what makes the refusal hold for a position * nobody enumerated; `handles.ts` says why that matters. */ export declare function checkExpression(checker: Checker, expression: Expression, placement: Placement): Type; /** * A condition, `language.md` 6.6: `bool` or absent, and nothing else. * * There is no truthiness in this language. A zero is not false and an empty * string is not false, because every silent coercion rule anywhere is a source * of bugs that survive review, and a script that places orders is the last * place to want one. */ export declare function checkCondition(checker: Checker, condition: Expression, placement: Placement): void; //# sourceMappingURL=expressions.d.ts.map