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.

During type checking, this gets replaced with an if let, maybe, although that’s not yet been implemented.

During type checking, this gets replaced with struct field access.

During type checking, this gets replaced with tuple arg access.

A UseStatement is a statement that imports something from a module into the local namespace.

A parsed while loop. Contains the condition, which is defined from an Expression, and the body from a CodeBlock.

Enums

Represents a parsed, but not yet type checked, Expression.

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.