41#ifndef COMPILER_MODULE_METADATA_H
42#define COMPILER_MODULE_METADATA_H
94 std::ostringstream
out;
95 out <<
"ModuleMetadata\n";
96 for (
size_t i = 0; i < modules.
size(); ++i)
98 const auto &
module = modules.access(i);
99 out <<
" Module(" <<
module.name << ")";
100 if (module.span.is_valid())
101 out <<
" @" <<
module.span.to_string();
104 for (
size_t j = 0; j <
module.exports.size(); ++j)
106 const auto &item =
module.exports.access(j);
108 if (item.declaration_span.is_valid())
109 out <<
" @" << item.declaration_span.to_string();
Source file and span management utilities for compiler-style tooling.
size_t size_t int32_t * out
size_t size() const noexcept
Return the current dimension of array.
Main namespace for Aleph-w library functions.
Compiler_Module_Export_Kind
Export kinds currently modeled by reusable module metadata.
std::string compiler_render_module_metadata(const DynArray< Compiler_Module_Metadata > &modules)
Renders one deterministic text artifact for module metadata.
const char * compiler_module_export_kind_name(const Compiler_Module_Export_Kind kind) noexcept
Returns the stable debug name for one module-export kind.
@ Function
Function type such as fn(Int) -> Bool.
One reusable top-level declaration exposed by a module surface.
Compiler_Module_Export_Kind kind
Source_Span declaration_span
Half-open byte range inside a source file.
Lazy and scalable dynamic array implementation.