Skip to main content

Module expr

Module expr 

Source
Expand description

Expressions, typed: every node carries its type, a field is its index and offset in the struct, sizeof its value.

Typing is bidirectional: a form with a type of its own (a variable, an operator, a field, a call) is typed and then checked against what its context expects ([expr], then [check]); a literal takes the expected type, sizeof(T) an expected unsigned type it fits, uint otherwise. Widths are strict, int being int64. The operators’ rules are ops.rs, the statements’ body.rs.

Structs§

Call
alias.f(args).
Expr
An expression.

Enums§

ExprKind
The expression forms.