taitan_orm_parser/template_parser/structs/exprs/
logic_expr.rs

1
2use crate::template_parser::structs::operators::{ListInOp, LogicOp};
3use crate::template_parser::structs::values::{BoolValue, TextValue};
4use crate::Operator;
5use crate::template_parser::MatchOp;
6use crate::template_parser::structs::exprs::text_expr::TextExpr;
7
8#[derive(Debug, Clone, PartialEq)]
9pub enum LogicExpr {
10    Value(BoolValue),
11
12    // 'aaa' like 'bbb'
13    TextMatchExpr {
14        left: Box<TextExpr>,
15        op: MatchOp,
16        right: Box<TextExpr>,
17    },
18
19    Nested(Box<LogicExpr>),
20    Expr {
21        left: Box<LogicExpr>,
22        op: LogicOp,
23        right: Box<LogicExpr>,
24    },
25}