Module sway_core::parse_tree
source · [−]Expand description
Contains all the code related to parsing Sway source code.
Re-exports
pub use declaration::*;
Modules
Structs
in the expression a::b::c()
, a
and b
are the prefixes and c
is the suffix.
c
can be any type T
, but in practice c
is either an Ident
or a TypeInfo
.
Represents a parsed, but not yet type checked, Expression.
A module and its submodules in the form of a tree.
A parsed, but not yet type-checked, Sway program.
A library module that was declared as a dep
of another module.
Represents some exportable information that results from compiling some Sway source code.
A UseStatement is a statement that imports something from a module into the local namespace.
Enums
Represents the various structures that constitute a Sway program.
Represents the left hand side of a reassignment, which could either be a regular variable expression, denoted by ReassignmentTarget::VariableExpression, or, a storage field, denoted by ReassignmentTarget::StorageField.
A Scrutinee is on the left-hand-side of a pattern, and dictates whether or not a pattern will succeed at pattern matching and what, if any, elements will need to be implemented in a desugared if expression.
A Sway program can be either a contract, script, predicate, or a library.
Type Definitions
The name used within a module to refer to one of its submodules.