pub enum Expression {
Literal(LiteralExpr),
Binary(BinaryExpr),
Variable(VariableExpr),
Unary(UnaryExpr),
Call(FunctionCallExpr),
Conditional(ConditionalExpr),
Block(BlockExpr),
FunctionType(FunctionTypeExpr),
}
Expand description
Expression nodes in the AST
Variants§
Literal(LiteralExpr)
A literal value (constant)
Binary(BinaryExpr)
A binary operation (e.g., a + b)
Variable(VariableExpr)
A variable reference
Unary(UnaryExpr)
A unary operation (e.g., -x)
Call(FunctionCallExpr)
A function call
Conditional(ConditionalExpr)
A conditional expression (if/else)
Block(BlockExpr)
A block expression with statements and optional return value
FunctionType(FunctionTypeExpr)
A function type expression (e.g., fn(i32, string) -> string)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
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