pub enum Expr {
Show 19 variants
Error,
Ident(Ident),
Literal(Literal),
Unary {
op: UnaryOp,
expr: ExprId,
},
Binary {
op: BinaryOp,
lhs: ExprId,
rhs: ExprId,
},
Assign {
op: AssignOp,
lhs: ExprId,
rhs: ExprId,
},
Ternary {
condition: ExprId,
then_expr: ExprId,
else_expr: ExprId,
},
Cast {
ty: AstTypeId,
expr: ExprId,
},
InstanceOf {
expr: ExprId,
ty: AstTypeId,
},
FieldAccess {
expr: ExprId,
name: Ident,
field_id: Option<FieldId>,
},
MethodCall {
expr: Option<ExprId>,
name: Ident,
type_args: Option<Vec<AstTypeId>>,
args: Vec<ExprId>,
method_id: Option<MethodId>,
},
New {
ty: AstTypeId,
args: Vec<ExprId>,
},
NewArray {
ty: AstTypeId,
dimensions: Vec<ExprId>,
initializer: Option<ExprId>,
},
ArrayInitializer {
elements: Vec<ExprId>,
},
ArrayAccess {
array: ExprId,
index: ExprId,
},
ArrayLength {
array: ExprId,
},
This(Option<ExprId>),
Super,
SuperCall {
name: Ident,
type_args: Option<Vec<AstTypeId>>,
args: Vec<ExprId>,
method_id: Option<MethodId>,
},
}Variants§
Error
Ident(Ident)
Literal(Literal)
Unary
Binary
Assign
Ternary
Cast
InstanceOf
FieldAccess
MethodCall
Fields
New
NewArray
ArrayInitializer
ArrayAccess
ArrayLength
This(Option<ExprId>)
Super
SuperCall
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 UnsafeUnpin 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