Expand description
Contains all the code related to parsing Sway source code.
Re-exports§
pub use declaration::*;
Modules§
Structs§
- AbiCast
Expression - Ambiguous
Path Expression - Ambiguous
Suffix - Array
Expression - Array
Index Expression - AstNode
- A single AstNode represents a node in the parse tree. Note that AstNode is a recursive type and can contain other AstNode, thus populating the tree.
- Code
Block - Delineated
Path Expression - Expression
- Represents a parsed, but not yet type checked, Expression.
- ForLoop
Expression - Function
Application Expression - IfExpression
- Include
Statement - Intrinsic
Function Expression - Lazy
Operator Expression - Match
Expression - Method
Application Expression - Parse
Module - A module and its submodules in the form of a tree.
- Parse
Program - A parsed, but not yet type-checked, Sway program.
- Parse
Submodule - A library module that was declared as a
mod
of another module. - Parse
Tree - Represents some exportable information that results from compiling some Sway source code.
- Qualified
Path Type - Reassignment
Expression - RefExpression
- Storage
Access Expression - Struct
Expression - Struct
Expression Field - Subfield
Expression - Tuple
Index Expression - UseStatement
- A UseStatement is a statement that imports something from a module into the local namespace.
- While
Loop Expression
Enums§
- AstNode
Content - Represents the various structures that constitute a Sway program.
- Expression
Kind - Import
Type - Method
Name - OpVariant
- Reassignment
Target - Scrutinee
- 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.
- Struct
Scrutinee Field - Tree
Type - A Sway program can be either a contract, script, predicate, or a library.