A work-in-progress SQL parser written in TypeScript
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

binary.ts 477B

123456789101112131415161718192021222324252627
  1. import * as AST from "../ast";
  2. export enum BinaryExpressionTypes {
  3. ADDITION,
  4. SUBTRACTION,
  5. MULTIPLICATION,
  6. DIVISION,
  7. EQUALITY,
  8. }
  9. interface IBinaryOptions {
  10. type: BinaryExpressionTypes;
  11. left: AST.Expr;
  12. right: AST.Expr;
  13. }
  14. export class Binary {
  15. public type: BinaryExpressionTypes;
  16. public left: AST.Expr;
  17. public right: AST.Expr;
  18. constructor(opts: IBinaryOptions) {
  19. this.type = opts.type;
  20. this.left = opts.left;
  21. this.right = opts.right;
  22. }
  23. }