47 main_module.
name =
"main.aw";
48 main_module.
imports.append({
"math.aw", {}});
49 descriptors.
append(std::move(main_module));
50 descriptors.
append({
"math.aw", {}});
54 main_metadata.
name =
"main.aw";
55 main_metadata.
exports.append({Compiler_Module_Export_Kind::Global,
"answer", {}});
56 main_metadata.
exports.append({Compiler_Module_Export_Kind::Type,
"Answer", {}});
57 metadata.
append(std::move(main_metadata));
60 math_metadata.
name =
"math.aw";
61 math_metadata.
exports.append({Compiler_Module_Export_Kind::Function,
"add", {}});
62 metadata.
append(std::move(math_metadata));
Reusable namespace-separated semantic environment for modules.
T & append()
Allocate a new entry to the end of array.
Main namespace for Aleph-w library functions.
Compiler_Module_Semantic_Environment compiler_build_module_semantic_environment(const Compiler_Module_Name_Table &table)
Builds one namespace-separated semantic environment from a name table.
std::string compiler_render_module_semantic_environment(const Compiler_Module_Semantic_Environment &env)
Renders one deterministic text artifact for semantic environments.
Compiler_Module_Name_Table compiler_build_module_name_table(const Compiler_Module_Binding_Result &bindings)
Builds one reusable per-module name table from bindings.
Compiler_Module_Link_Result compiler_link_module_surfaces(const DynArray< Compiler_Module_Descriptor > &descriptors, const DynArray< Compiler_Module_Metadata > &metadata, const DynArray< size_t > &order)
Links direct-import module surfaces into visible top-level views.
Compiler_Module_Binding_Result compiler_bind_module_surfaces(const Compiler_Module_Link_Result &linkage)
Binds linked module surfaces into one deterministic name view.
One module descriptor consumed by the reusable resolver.
DynArray< Compiler_Module_Dependency > imports
Ordered dependency list.
std::string name
Stable module/source name.