thaw-grammar
Version:
Implementations of the grammars of several programming languages, including LISP, Scheme, Prolog, and the Lambda Calculus.
19 lines • 856 B
TypeScript
import { Name } from 'thaw-interpreter-core';
import { IEnvironmentFrame } from './environment-frame';
import { IExpression } from './iexpression';
import { IGlobalInfo } from './iglobal-info';
import { IVariable } from './variable';
export interface IFunctionDefinition<T> extends IExpression<T> {
readonly functionName: Name;
readonly argList: IVariable<T>[];
readonly body: IExpression<T>;
}
export declare class FunctionDefinition<T> implements IFunctionDefinition<T> {
readonly functionName: Name;
readonly argList: IVariable<T>[];
readonly body: IExpression<T>;
constructor(functionName: Name, argList: IVariable<T>[], body: IExpression<T>);
toString(): string;
evaluate(globalInfo: IGlobalInfo<T>, localEnvironment?: IEnvironmentFrame<T>, options?: unknown): T;
}
//# sourceMappingURL=function-definition.d.ts.map