feat: add Sub and Abs expression nodes

This commit is contained in:
Anand Balakrishnan 2023-04-04 14:32:37 -07:00
parent 4dc6effbde
commit 2b447409a1
No known key found for this signature in database
2 changed files with 44 additions and 22 deletions

View file

@ -26,8 +26,11 @@ pub enum NumExpr {
Neg { arg: Box<NumExpr> },
Add { args: Vec<NumExpr> },
Sub { lhs: Box<NumExpr>, rhs: Box<NumExpr> },
Mul { args: Vec<NumExpr> },
Div { dividend: Box<NumExpr>, divisor: Box<NumExpr> },
Abs { arg: Box<NumExpr> },
}
impl Expr for NumExpr {