taitan_orm_parser/template_parser/structs/exprs/
arithmetic_expr.rs1use std::collections::VecDeque;
2use crate::template_parser::structs::exprs::text_expr::TextExpr;
3use crate::template_parser::structs::values::{NumberValue, TextValue};
4use crate::template_parser::ArithmeticOp;
5use nom::branch::alt;
6use nom::bytes::complete::tag;
7use nom::character::complete::multispace0;
8use nom::combinator::map;
9use nom::sequence::{delimited, preceded};
10use nom::IResult;
11use tracing::debug;
12
13#[derive(Debug, Clone, PartialEq)]
14pub enum ArithmeticExpr {
15 Value(NumberValue),
16 Nested(Box<ArithmeticExpr>),
17 Expr {
18 left: Box<ArithmeticExpr>,
19 op: ArithmeticOp,
20 right: Box<ArithmeticExpr>,
21 },
22}