123456789101112131415161718192021222324252627282930 |
- import * as AST from "../ast";
-
- export enum BinaryExpressionTypes {
- ADDITION = "ADDITION",
- AND = "AND",
- DIVISION = "DIVISION",
- DOT = "DOT",
- EQUALITY = "EQUALITY",
- MULTIPLICATION = "MULTIPLICATION",
- OR = "OR",
- SUBTRACTION = "SUBTRACTION",
- }
-
- interface IBinaryOptions {
- type: BinaryExpressionTypes;
- left: AST.Expr;
- right: AST.Expr;
- }
-
- export class Binary {
- public type: BinaryExpressionTypes;
- public left: AST.Expr;
- public right: AST.Expr;
-
- constructor(opts: IBinaryOptions) {
- this.type = opts.type;
- this.left = opts.left;
- this.right = opts.right;
- }
- }
|