/** * Calls: to the library, to a user function, and to the handful of names that * declare part of the file rather than computing anything. * * The split in this file is the one the task of emitting a program turns on. A * `plot` call is a fixed entry in `outputs` plus one `EMIT` per bar, and it is * not a function an engine calls at all. An `ema` call is a `CALL_LIB` with a * state region. A call to a `fn` is a `CALL_FN` naming a call site, and the * call site rather than the body is where that call's cells and state live. */ import type { Call, Expression, Member, NameReference } from '../ast/index.js'; import type { Emitter, Frame } from './context.js'; /** Whether a call leaves a value on the stack, which a statement has to pop. */ export declare function leavesValue(e: Emitter, expression: Expression): boolean; /** * Whether an expression is entirely one `input()` call. * * The declaration calls leave nothing on the stack, which is what `leavesValue` * answers, and `input()` is the one of them that also has a value to leave when * a value is what was asked for (`language.md` 13.4). One place needs the * narrower question: `var len = input(14, "Length")`, where the initialiser is * a value to put in a cell rather than a declaration the name stands for. */ export declare function isInputCall(e: Emitter, expression: Expression): boolean; export declare function emitCall(e: Emitter, f: Frame, call: Call): void; /** * A library value read without brackets: a bar series, a named colour, a fact * about the chart, the session or the position. * * Only a bar series is a register. Everything else is a value the host supplies * and the only instruction that can fetch one is a call of no arguments, so * that is what it compiles to and the engine's own manifest decides the value. * A named colour goes the same way deliberately: the exact channels are the * manifest's (`stdlib.md` 11.1), and a colour that reaches a bar should come * from there rather than from this compiler's stand-in table. */ export declare function emitLibraryValue(e: Emitter, f: Frame, node: NameReference | Member): void; //# sourceMappingURL=calls.d.ts.map