mathengine_parser/ast.rs
1use mathengine_lexer::Operation;
2
3#[derive(Debug, Clone)]
4pub enum Expression {
5 Number(f64),
6 UnitValue {
7 value: f64,
8 unit: String,
9 },
10 Unit(String),
11 Binary {
12 op: Operation,
13 left: Box<Expression>,
14 right: Box<Expression>,
15 },
16 Unary {
17 op: Operation,
18 operand: Box<Expression>,
19 },
20}