Crate sway_core

source ·

Re-exports

pub use asm_generation::from_ir::compile_ir_to_asm;
pub use semantic_analysis::namespace;
pub use error::CompileResult;
pub use type_system::*;

Modules

The DeclEngine allows the compiler to add a layer of separation between AST nodes and declarations.
Tools related to handling/recovering from Sway compile errors and reporting them to the user.
Type checking for Sway.

Macros

Structs

Configuration for the overall build and compilation process.
The bytecode for a sway program as well as the byte offsets of configuration-time constants in the bytecode.
The set of items that represent the namespace context passed throughout type checking.

Enums

Functions

Given the assembly (opcodes), compile to CompiledBytecode, containing the asm in bytecode form.
Given an AST compilation result, try compiling to a CompiledAsm, containing the asm in opcode form (not raw bytes/bytecode).
Given input Sway source code, try compiling to a CompiledAsm, containing the asm in opcode form (not raw bytes/bytecode).
Given input Sway source code, compile to CompiledBytecode, containing the asm in bytecode form.
Inline function calls based on two conditions:
Given an input Arc<str> and an optional BuildConfig, parse the input into a lexed::LexedProgram and parsed::ParseProgram.
Parses the tree kind in the input provided.