Enum gluon_base::ast::Expr [] [src]

pub enum Expr<Id> {
    Ident(TypedIdent<Id>),
    Literal(Literal),
    App(Box<SpannedExpr<Id>>, Vec<SpannedExpr<Id>>),
    Lambda(Lambda<Id>),
    IfElse(Box<SpannedExpr<Id>>, Box<SpannedExpr<Id>>, Box<SpannedExpr<Id>>),
    Match(Box<SpannedExpr<Id>>, Vec<Alternative<Id>>),
    Infix(Box<SpannedExpr<Id>>, TypedIdent<Id>, Box<SpannedExpr<Id>>),
    Projection(Box<SpannedExpr<Id>>, Id, ArcType<Id>),
    Array(Array<Id>),
    Record {
        typ: ArcType<Id>,
        types: Vec<(Id, Option<ArcType<Id>>)>,
        exprs: Vec<(Id, Option<SpannedExpr<Id>>)>,
    },
    Tuple(Vec<SpannedExpr<Id>>),
    LetBindings(Vec<ValueBinding<Id>>, Box<SpannedExpr<Id>>),
    TypeBindings(Vec<TypeBinding<Id>>, Box<SpannedExpr<Id>>),
    Block(Vec<SpannedExpr<Id>>),
}

The representation of gluon's expression syntax

Variants

Identifiers

Literal values

Function application, eg. f x

Lambda abstraction, eg. \x y -> x * y

If-then-else conditional

Pattern match expression

Infix operator expression eg. f >> g

Record field projection, eg. value.field

Array construction

Record construction

Fields

Tuple construction

Declare a series of value bindings

Declare a series of type aliases

A group of sequenced expressions

Trait Implementations

impl<Id: Clone> Clone for Expr<Id>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<Id: PartialEq> PartialEq for Expr<Id>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<Id: Debug> Debug for Expr<Id>
[src]

Formats the value using the given formatter.

impl Typed for Expr<Symbol>
[src]