pub enum Expr {
Show 16 variants
Missing,
Call {
callee: ExprId,
args: Vec<ExprId>,
},
Path(Path),
If {
condition: ExprId,
then_branch: ExprId,
else_branch: Option<ExprId>,
},
UnaryOp {
expr: ExprId,
op: UnaryOp,
},
BinaryOp {
lhs: ExprId,
rhs: ExprId,
op: Option<BinaryOp>,
},
Index {
base: ExprId,
index: ExprId,
},
Block {
statements: Vec<Statement>,
tail: Option<ExprId>,
},
Return {
expr: Option<ExprId>,
},
Break {
expr: Option<ExprId>,
},
Loop {
body: ExprId,
},
While {
condition: ExprId,
body: ExprId,
},
RecordLit {
type_id: Idx<TypeRef>,
fields: Vec<RecordLitField>,
spread: Option<ExprId>,
},
Field {
expr: ExprId,
name: Name,
},
Array(Vec<ExprId>),
Literal(Literal),
}
Variants§
Missing
Used if the syntax tree does not have a required expression piece
Call
Path(Path)
If
UnaryOp
BinaryOp
Index
Block
Return
Break
Loop
While
RecordLit
Field
Array(Vec<ExprId>)
Literal(Literal)
Implementations§
Trait Implementations§
impl Eq for Expr
impl StructuralEq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.