calcium-lang
Version:
Calcium language interpreter
20 lines (19 loc) • 539 B
TypeScript
import * as Expr from "./index";
import { InternalType, RawType } from "../type";
/**
* execute an arbitrary binary operator
*/
declare type Operate = (l: RawType, r: RawType) => InternalType;
/**
* use a binary operator and calculate
*/
export default class BinaryOperation {
readonly operator: string;
readonly left: Expr.Expression;
readonly right: Expr.Expression;
static table: {
[key: string]: Operate;
};
constructor(operator: string, left: Expr.Expression, right: Expr.Expression);
}
export {};