pub struct Unary {
pub operator: UnOperator,
pub expr: Box<Expr>,
pub token: Token,
}Expand description
Represents a unary expression in the AST.
Unary expressions operate on a single operand (e.g., -a).
Fields§
§operator: UnOperatorThe operator used in the unary expression.
expr: Box<Expr>The operand of the unary expression.
token: TokenThe token representing the unary operation in the source code.
Trait Implementations§
impl StructuralPartialEq for Unary
Auto Trait Implementations§
impl Freeze for Unary
impl RefUnwindSafe for Unary
impl Send for Unary
impl Sync for Unary
impl Unpin for Unary
impl UnwindSafe for Unary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)