Expand description
Abstract syntax tree representation.
Structs
An array definition, e.g. [ MyInt ]
.
An inline array literal, e.g. [ 2, 3, 5, 7 ]
.
A variable assignment within an expression, e.g. x = 10
.
A binary operation within an expression.
A let binding, e.g. let a = 1;
.
A regular block.
A function or method call or an enum variant constructor (variant with data).
An explicit as
type-cast.
An enum definition, e.g. enum MyEnum { A, B(u32) }
.
A for-in loop, e.g. for i in 0..10 { ... }
.
A function definition, e.g. fn myfunc(a: u8, b: String) -> u16 { ... }
.
An identifier for an item, e.g. item
.
An if block, e.g. if a { ... } else { ... }
.
An impl
block for a struct, e.g. impl MyStruct { fn new() { ... } -> Self }
.
A literal.
A match block, e.g. match e { Enum::Variant => { ... } }
.
A member identifier for a struct field.
A module declaration, e.g. mod mymodule;
.
A path to an item, e.g. path::to::item
.
A position in the source code.
A return statement, e.g. return false;
.
The type signatures of function parameters and returns.
A struct definition, e.g. struct MyStruct { a: u8, b: String }
.
An inline struct literal, e.g. MyStruct { a: 10, b: "Hello" }
.
A trait
definition, e.g. trait Demoable { fn needthis(); fn gotthis() { ... } }
.
A type name (a type-id attached to a Path).
A unary operation within an expression.
A use declaration, e.g. use frontend::{ast::Use, parser::{parse, parse_module}};
.
A variable.
An enum variant definition, e.g. MyVariant(u16, f32)
or MySimpleVariant
.
An enum variant literal (simple, without data), e.g. MyEnum::MySimpleVariant
.
A while loop, e.g. while a < 10 { a += 1; }
.
Enums
A binary operator used in binary expressions.
The particular type of a function call.
An itsy expression.
An inlineable type (e.g. MyStruct
or [ MyInt; 16 ]
).
Value-storage for literals.
An itsy statement.
A unary operator used in unary expressions.
The kind of a variant, either Simple
(without associated data) or Data
.
Visibility of types and functions.