Enum pomelo_hir::hir::ExprKind

source ·
pub enum ExprKind {
    Missing,
    Scon(Scon),
    Seq {
        exprs: Box<[Idx<Expr>]>,
    },
    VId {
        op: bool,
        longvid: (LongVId, DefLoc),
    },
    Record {
        rows: Box<[ExpRow]>,
    },
    Let {
        dec: Idx<Dec>,
        expr: Idx<Expr>,
    },
    Application {
        expr: Idx<Expr>,
        param: Idx<Expr>,
    },
    Infix {
        lhs: Idx<Expr>,
        vid: (VId, DefLoc),
        rhs: Idx<Expr>,
    },
    Typed {
        expr: Idx<Expr>,
        ty: Idx<Ty>,
    },
    Handle {
        expr: Idx<Expr>,
        match_: Box<[MRule]>,
    },
    Raise {
        expr: Idx<Expr>,
    },
    Fn {
        match_: Box<[MRule]>,
    },
}
Expand description

Kinds of HIR expressions.

These correspond to the basic forms in Chapter 2 of the Definition, after desugaring the derived forms from Appendix A.

Variants§

§

Missing

§

Scon(Scon)

§

Seq

Fields

§exprs: Box<[Idx<Expr>]>
§

VId

Fields

§op: bool
§longvid: (LongVId, DefLoc)
§

Record

Fields

§rows: Box<[ExpRow]>
§

Let

Fields

§dec: Idx<Dec>
§expr: Idx<Expr>
§

Application

Fields

§expr: Idx<Expr>
§param: Idx<Expr>
§

Infix

Fields

§lhs: Idx<Expr>
§vid: (VId, DefLoc)
§rhs: Idx<Expr>
§

Typed

Fields

§expr: Idx<Expr>
§ty: Idx<Ty>
§

Handle

Fields

§expr: Idx<Expr>
§match_: Box<[MRule]>
§

Raise

Fields

§expr: Idx<Expr>
§

Fn

Fields

§match_: Box<[MRule]>

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.