pub enum Expr {
Number(f64),
String(String),
Bool(bool),
Error(String),
CellRef(CellReference),
Range {
start: CellReference,
end: CellReference,
},
Function {
name: String,
args: Vec<Expr>,
},
BinaryOp {
op: BinaryOperator,
left: Box<Expr>,
right: Box<Expr>,
},
UnaryOp {
op: UnaryOperator,
operand: Box<Expr>,
},
Paren(Box<Expr>),
}Expand description
A parsed Excel formula expression.
Variants§
Number(f64)
Numeric literal (e.g., 42, 3.14)
String(String)
String literal (e.g., “hello”)
Bool(bool)
Boolean literal (TRUE/FALSE)
Error(String)
Error literal (#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, #NULL!)
CellRef(CellReference)
Cell reference (e.g., A1, $B$2)
Range
Range reference (e.g., A1:B10)
Function
Function call (e.g., SUM(A1:A10))
BinaryOp
Binary operation (e.g., A1 + B1)
UnaryOp
Unary operation (e.g., -A1, +5)
Paren(Box<Expr>)
Parenthesized expression
Trait Implementations§
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more