Expand description
Structs§
- AddrOf
- An address-of expression:
&
mut
?Expr
- Alias
- An alias to another Ty
- Array
- An Array literal:
[
Expr
(,
Expr
)*]
- Array
Rep - An Array literal constructed with repeat syntax
[
Expr;
Literal]
- Assign
- An Assignment expression:
Expr
(ModifyKind
Expr
)+ - Attrs
- A list of Meta decorators
- Binary
- A Binary expression:
Expr
(BinaryKind
Expr
)+ - Block
- A Block expression:
{
Stmt
*Expr
?}
- Break
- A Break expression:
break
Expr
? - Cast
- A cast expression:
Expr
as
Ty
- Closure
- A Closure expression:
|
Expr
|
( ->Ty
)?Expr
- Const
- A compile-time constant
- Else
- The (optional)
else
clause of a While, If, or For expression - Enum
- A user-defined sum type
- Expr
- An expression, the beating heart of the language
- Fielder
- A [Struct field initializer] expression: Sym (
=
Expr)? - File
- A list of Items
- For
- A For expression:
for
Patternin
Expr
Block
Else
? - Function
- Code, and the interface to that code
- Generics
- A list of type variables to introduce
- Group
- A Grouping expression
(
Expr
)
- If
- An If expression:
if
Expr
Block
Else
? - Impl
- Sub-items (associated functions, etc.) for a Ty
- Index
- A repeated Index expression: a[10, 20, 30][40, 50, 60]
- Item
- Anything that can appear at the top level of a File
- Let
- A local variable declaration Stmt
- Match
- A
match
expression:match
{
(MatchArm,
)* MatchArm?}
- Match
Arm - A single arm of a Match expression:
Pattern
=>
Expr
- Member
- A Member access expression:
Expr
MemberKind
* - Meta
- A metadata decorator
- Modify
- A Modify-assignment expression:
Expr
(ModifyKind
Expr
)+ - Module
- An ordered collection of Items
- Path
- A path to an Item in the Module tree
- Quote
- A backtick-quoted subexpression-literal
- Return
- A Return expression
return
Expr
? - Static
- A
static
variable - Stmt
- An abstract statement, and associated metadata
- Struct
- A user-defined product type
- Struct
Member - The Visibility, Sym, and Type of a single Struct member
- Structor
- A Struct creation expression: Path
{
(Fielder,
)* Fielder?}
- Tuple
- A Tuple expression:
(
Expr
(,
Expr
)+)
- Ty
- A type expression
- TyArray
- An array of
T
- TyFn
- The args and return value for a function pointer Type
- TyRef
- A Type-reference expression as (number of
&
, Path) - TySlice
- A Type slice expression:
[T]
- TyTuple
- A tuple of Types
- Unary
- A Unary expression:
UnaryKind
*Expr
- Use
- An import of nonlocal Items
- Variant
- A single Enum variant
- While
- A While expression:
while
Expr
Block
Else
?
Enums§
- Binary
Kind - A Binary operator
- Expr
Kind - Any of the different Expressions
- Impl
Kind - Item
Kind - What kind of Item is this?
- Literal
- A Literal: 0x42, 1e123, 2.4, “Hello”
- Member
Kind - The kind of Member access
- Meta
Kind - Information attached to Metadata
- Modify
Kind - Mutability
- Whether a binding (Static or Let) or reference is mutable or not
- Path
Part - A single component of a Path
- Pattern
- A Pattern meta-expression (any
ExprKind
that fits pattern rules) - Semi
- Whether or not a Stmt is followed by a semicolon
- Stmt
Kind - Whether the Stmt is a Let, Item, or Expr statement
- Struct
Kind - Either a Struct’s StructMembers or tuple Types, if present.
- TyKind
- Information about a Type expression
- Unary
Kind - A Unary operator
- UseTree
- A tree of Item imports
- Visibility
- Whether an Item is visible outside of the current Module