Skip to main content

Module expr

Module expr 

Source
Available on crate feature ast-models only.
Expand description

AST models for expressions in wright source code.

Structs§

BinaryExpr
A binary operation, such as a + b.
CallExpr
A function call, such as f(1, 2).
CastExpr
A type cast, such as x as u64.
Expr
An expression in wright source code.
FieldExpr
A field access, such as point.x.
FieldInit
A field initializer in a RecordLiteral, such as the x: 1 in Point { x: 1 }.
ForExpr
A for loop, such as for i in 0..10 { ... }.
IfExpr
An if expression.
IndexExpr
An index expression, such as a[i].
LoopExpr
An infinite loop.
RangeExpr
A range, such as 0..10 or 1..=100.
RecordLiteral
A record literal, such as Point { x: 1, y: 2 }.
UnaryExpr
A unary operation, such as -x.
WhileExpr
A while loop.

Enums§

ArrayLiteral
An array literal.
BinaryOperation
The different binary operations.
Binding
A name being bound in a let/var statement or for loop.
ExprKind
The different kinds of Exprs.
UnaryOperation
The different unary operations.