UNPKG

thaw-grammar

Version:

Implementations of the grammars of several programming languages, including LISP, Scheme, Prolog, and the Lambda Calculus.

36 lines 1.53 kB
import { IVariable } from './variable'; export interface IEnvironmentFrame<T> { readonly dict: Map<string, T>; readonly next?: IEnvironmentFrame<T>; readonly frameNumber: number; isDefined(key: IVariable<T>): boolean; has(key: IVariable<T>): boolean; lookup(key: IVariable<T>): T; setInThisFrame(key: IVariable<T>, value: T): void; add(key: IVariable<T>, value: T): void; addBubbleDown(key: IVariable<T>, value: T): void; findAndSet(key: IVariable<T>, value: T): T; findSetAndReturnBoolean(key: IVariable<T>, value: T): boolean; upsert(key: IVariable<T>, value: T): T; compose(keys: IVariable<T>[], values: T[]): void; stackDump(): void; } export declare class EnvironmentFrame<T> implements IEnvironmentFrame<T> { readonly dict: Map<string, T>; readonly next: IEnvironmentFrame<T> | undefined; readonly frameNumber: number; constructor(next?: IEnvironmentFrame<T>); isDefined(key: IVariable<T>): boolean; has(key: IVariable<T>): boolean; lookup(key: IVariable<T>): T; setInThisFrame(key: IVariable<T>, value: T): void; add(key: IVariable<T>, value: T): void; addBubbleDown(key: IVariable<T>, value: T): void; findSetAndReturnBoolean(key: IVariable<T>, value: T): boolean; findAndSet(key: IVariable<T>, value: T): T; upsert(key: IVariable<T>, value: T): T; compose(keys: IVariable<T>[], values: T[]): void; stackDump(): void; private dictionaryContainsKey; } //# sourceMappingURL=environment-frame.d.ts.map