Module sway_core::decl_engine
source · Expand description
The DeclEngine allows the compiler to add a layer of separation between AST nodes and declarations.
As an interface, you can think of the DeclEngine as a mapping from DeclId to DeclWrapper. When a DeclWrapper is inserted into the DeclEngine, a DeclId is generated, which is then used to refer to the declaration.
Structs
Used inside of type inference to store declarations.
An ID used to refer to an item in the DeclarationEngine