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