123456789101112131415161718192021222324252627 |
- import * as AST from "../ast";
-
- export enum BinaryExpressionTypes {
- ADDITION,
- SUBTRACTION,
- MULTIPLICATION,
- DIVISION,
- EQUALITY,
- }
-
- 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;
- }
- }
|