export type BindingKind = 'variable' | 'function' | 'parameter' | 'loop'; export interface Binding { readonly output: string; readonly kind: BindingKind; readonly topLevel: boolean; /** Bound to a declaration handle, which only `fill` may take. */ handle: 'plot' | 'level' | undefined; /** Never absent on any bar: bound to an input or a literal and never reassigned. */ present: boolean; /** A whole-number constant in the source dialect's sense, which version 5 divides without a fraction. */ whole: boolean; /** A function's parameters, source spelling to output spelling, for its named arguments. */ labels: ReadonlyMap | undefined; } export declare class Scope { readonly names: Map; readonly parent: Scope | undefined; constructor(parent: Scope | undefined); find(name: string): Binding | undefined; get isGlobal(): boolean; } export declare class Namer { #private; /** `used` is every identifier the source writes, anywhere. */ constructor(used: Iterable); /** Whether OpenScript already means something by this name. */ static reserved(name: string): boolean; /** A spelling no source name and no OpenScript name has, starting from `base`. */ fresh(base: string): string; /** * The spelling of a source name declared in `scope`. * * `hides` says whether an enclosing scope can already see the name, which is * the case the source dialect reads as a new name and OpenScript would read * as an update of the old one. */ declare(name: string, hides: boolean): string; } /** A binding with the defaults a plain declaration has. */ export declare function binding(output: string, kind: BindingKind, topLevel: boolean): Binding; //# sourceMappingURL=names.d.ts.map