export type ExprCode = number | string; export type ExprNodeType = "apply" | "block" | "assign" | "if" | "negate" | "return" | "statements" | "var" | "+" | "-" | "*" | "/" | "==" | "!=" | "<" | "<=" | ">" | ">=" | "&&" | "||" | "!" | "~" | "^" | "%" | "?"; export type ExprAtom = string | ManifestNumber; export type ExprCell = [ExprNodeType, ExprNode[]]; export type ExprNode = ExprAtom | ExprCell; export type ManifestNumberType = "intAbstract" | "floatAbstract"; export declare class ManifestNumber { type: ManifestNumberType; value: number; constructor(type: ManifestNumberType, value: number); } export type ParsedExpr = ExprNode; export type EvalEnv = { [name: string]: number | string; }; export declare function parseCode(code: ExprCode): ExprNode; export declare function substitute(ast: ExprNode, match: (node: ExprNode) => boolean, replace: (node: ExprNode) => ExprNode): ExprNode; export declare function substituteIdentifiers(ast: ExprNode, subs: { [name: string]: ExprNode; }): ExprNode; export declare function exprNodeToString(ast: ExprNode): string; export declare function exprNodeToWebGLShader(ast: ExprNode): string; export declare function exprCodeToWebGLShader(code: ExprCode, identifierSubs?: { [ident: string]: ExprNode; }): string; export type CompiledExpr = (env: { [name: string]: any; }) => number; export declare function compileCode(code: ExprCode): CompiledExpr; export declare function evalCode(input: ExprCode, env: { [name: string]: any; }): number;