43#ifndef COMPILER_MODULE_NAME_DIAGNOSTICS_H
44#define COMPILER_MODULE_NAME_DIAGNOSTICS_H
67 const std::string &
code,
81 "cannot resolve " +
subject +
" '" +
resolution.symbol_name +
"' because module '"
82 +
resolution.module_name +
"' is not available")
84 .
note(
"the current binding view does not contain that module")
85 .
help(
"ensure the source was loaded and its imports were resolved before semantic checks")
92 +
"' does not expose that name through local declarations or direct imports")
93 .
help(
"declare the symbol locally or import a module that exports it")
99 .
note(
"module '" +
resolution.module_name +
"' resolves that name as "
101 .
help(
"use a symbol exported with the expected kind")
108 +
"' sees multiple matching providers for that name")
109 .
help(
"rename one provider or reduce the set of direct imports")
Reusable top-level name lookup over bound module surfaces.
Plain-text diagnostic engine for compiler-style tooling.
Diagnostic_Builder & code(const std::string &value)
Sets the stable diagnostic code.
size_t emit() const noexcept
Finalizes the builder and returns the diagnostic index.
Diagnostic_Builder & help(const std::string &msg)
Appends a help line.
Diagnostic_Builder & note(const std::string &msg)
Appends a note line.
Diagnostic accumulator and renderer.
Diagnostic_Builder error(const Source_Span &span, const std::string &msg)
Starts an error diagnostic.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Main namespace for Aleph-w library functions.
std::string code(Node *root)
Compute a string with the Lukasiewicz`s word of a tree.
size_t compiler_emit_module_name_resolution_diagnostic(Diagnostic_Engine &diagnostics, const Source_Span &span, const Compiler_Module_Name_Resolution &resolution, const std::string &code, const std::string &subject)
Emits one structured diagnostic for a module-name resolution failure.
const char * compiler_module_export_kind_name(const Compiler_Module_Export_Kind kind) noexcept
Returns the stable debug name for one module-export kind.
Structured result returned by reusable module-name resolution.
Half-open byte range inside a source file.